Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#4099 closed defect (invalid)

Regression in mpeg12dec? coded_width/height are left uninitialized

Reported by: Underground78 Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords:
Cc: michael Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

After 77f1199e8fd9a289ad64eb2bb5bd4deeda8bccb8, AVCodecContext.coded_width and AVCodecContext.coded_height are 0 after the decoder init. Those values used to be correct before that commit (for example when using the attached sample).

I expect those fields to be valid after the decoder init so I see this as a regression. However I'm not completely sure how to understand the doc:

decoding: May be set by the user before opening the decoder if known e.g. from the container. During decoding, the decoder may overwrite those values as required.

If I'm getting it wrong, it might be good to clarify the doc.

Attachments (1)

sample_frame_dim_0.m2ts (2.0 MB) - added by Underground78 5 years ago.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by Underground78

comment:1 Changed 5 years ago by Underground78

  • Component changed from undetermined to avcodec
  • Summary changed from Regression in 77f1199e8fd9a289ad64eb2bb5bd4deeda8bccb8 ? to Regression in mpeg12dec ?

comment:2 Changed 5 years ago by Underground78

  • Summary changed from Regression in mpeg12dec ? to Regression in mpeg12dec? coded_width/height are left uninitialized

Any news on this?

comment:3 Changed 4 years ago by michael

  • Resolution set to invalid
  • Status changed from new to closed

in mpeg1/2 the width/height is stored with the keyframes
as soon as one is decoded you have the correct value. Before one is decoded the value is not always known. The code could leave your value but you could then just find that with the first frame that the actual width / height is different.
The 0,0 shows clearly that the value isnt know yet, leaving them initialized to what the user set but then chaging them on the first frame seems more confusing to me

comment:4 Changed 4 years ago by michael

  • Cc michael added

comment:5 Changed 4 years ago by michael

About the docs, if you have/want to suggest a better text iam happy to change it

comment:6 Changed 4 years ago by Underground78

I guess the docs are good enough as they are after all. I don't really remember what got me confused.

Note: See TracTickets for help on using tickets.