[FFmpeg-devel] [PATCH 2/3] ffmpeg.c: refine picking default video stream

Anton Khirnov anton at khirnov.net
Sun Oct 25 15:09:42 EET 2020


Quoting Michael Niedermayer (2020-10-21 13:17:46)
> 
> are we talking about the same thing ?
> ./ffmpeg  -i ~/tickets/4496/08_lect_01.rm  file.avi
> 
> produces a output over 1 hour long before the patch, theres no seek to before EOF
> 
> ./ffmpeg  -i ~/tickets/4496/08_lect_01.rm  file-new.avi
> 
> after the patch the output is empty
> 
> IMHO, its important to remove access to internal fields from applications.
> its important to cleanup code but its also important to do the cleanup
> cleanly. And just droping everything thats in the way instead of spending
> the hour(s) to do it properly. That is IMHO tainted cleanup, as if you
> wash a dirty surface with dirty water ;)

Do you have any actual suggestions as to what a "clean" solution should
look like? "Not break any samples" is not a vary practical one, since I
don't have all your samples and besides is too restrictive, since any
change can potentially break some workflow [1].

How about exporting a per-AVStream flag that indicates whether there
were every any packets seen for that stream? That would allow to keep
current functionality in ffmpeg.c and still avoid exporting too much
detail about the inner workings of avformat_find_stream_info().

[1] https://xkcd.com/1172/

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list