Opened 9 years ago

Closed 8 years ago

Last modified 8 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 Niedermayer 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 9 years ago.

Download all attachments as: .zip

Change History (7)

by Underground78, 9 years ago

Attachment: sample_frame_dim_0.m2ts added

comment:1 by Underground78, 9 years ago

Component: undeterminedavcodec
Summary: Regression in 77f1199e8fd9a289ad64eb2bb5bd4deeda8bccb8 ?Regression in mpeg12dec ?

comment:2 by Underground78, 9 years ago

Summary: Regression in mpeg12dec ?Regression in mpeg12dec? coded_width/height are left uninitialized

Any news on this?

comment:3 by Michael Niedermayer, 8 years ago

Resolution: invalid
Status: newclosed

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 by Michael Niedermayer, 8 years ago

Cc: Michael Niedermayer added

comment:5 by Michael Niedermayer, 8 years ago

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

comment:6 by Underground78, 8 years ago

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.