[FFmpeg-devel] [PATCH] avformat/utils: always preserve container dimensions for all streams

Michael Niedermayer michael at niedermayer.cc
Tue Jan 26 00:46:47 EET 2021


On Sun, Jan 24, 2021 at 11:41:13AM -0300, James Almer wrote:
> If a decoder is used for probing it may change the dimensions reported by the
> demuxer, either by the lowres factor or because of assorted frames reporting
> different dimensions, and in a codec copy scenario, the last dimensions
> arbitrarily set by it could end up being propagated to the muxer.
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavformat/utils.c                     | 10 ++++++----
>  tests/ref/fate/cbs-vp9-vp90-2-05-resize |  2 +-
>  tests/ref/fate/redcode-demux            |  2 +-
>  tests/ref/fate/wtv-demux                |  4 ++--
>  4 files changed, 10 insertions(+), 8 deletions(-)
> 

breaks:

./ffmpeg -i tickets/2892/MPEG_tbn_test.mov  -c:v copy -c:a copy -vtag mx3n -timecode 10:00:00:00 -vframes 3 file.mov
...
[mov @ 0x558785108e00] D-10/IMX must use 720x608 or 720x512 video resolution
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 -- 

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210125/afdea071/attachment.sig>


More information about the ffmpeg-devel mailing list