On 9/9/2020 7:54 PM, Michael Niedermayer wrote: > On Thu, Sep 03, 2020 at 03:55:04PM -0300, James Almer wrote: >> Actually write it in yuv4_write_header() instead of with the first >> packet. >> >> Signed-off-by: James Almer <jamr...@gmail.com> >> --- >> libavformat/yuv4mpegenc.c | 35 ++++++++++++++--------------------- >> 1 file changed, 14 insertions(+), 21 deletions(-) > > This changes the written header > for example: > ./ffmpeg -i ~/tickets/2190/clip.yuv -bitexact testbad.y4m > > YUV4MPEG2 W720 H480 F30000:1001 Ip A10:11 C411 XYSCSS=411 > vs > YUV4MPEG2 W720 H480 F30000:1001 Ib A10:11 C411 XYSCSS=411
If I'm reading this right, ffmpeg.c changes the output AVCodecParameters struct (In this case, field_order) after calling avformat_write_header() but before writing a packet, which is wrong. We could revert this change (And the one by Andreas that came after it), but perhaps ffmpeg.c should be fixed to not violate the API instead. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".