mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-02-13 19:05:37 +00:00
The only meaningful difference between choose_pix_fmts and the default code was the inclusion of an extra branch for `keep_pix_fmt` being true. However, in this case, we either: 1. Force the specific `ofp->format` that we inherited from ofilter_bind_ost, or if no format was set: 2. Print an empty format list Both of these goals can be accomplished by simply moving the decision logic to ofilter_bind_ost, to avoid setting any format list when keep_pix_fmt is enabled. This is arguably cleaner as it moves format selection logic to a single function. In the case of branch 1, nothing else needs to be done as we already force the format provided in ofp->format, if any is set. Add an assertion to verify this assumption just in case. (Side note: The "choose_*" family of functions are arguably misnomers, as they should really be called "print_*" - their current behavior is to print the relevant format lists to the `vf/af_format` filter arguments) Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Niklas Haas <git@haasn.dev> |
||
|---|---|---|
| .. | ||
| cmdutils.c | ||
| cmdutils.h | ||
| ffmpeg.c | ||
| ffmpeg.h | ||
| ffmpeg_dec.c | ||
| ffmpeg_demux.c | ||
| ffmpeg_enc.c | ||
| ffmpeg_filter.c | ||
| ffmpeg_hw.c | ||
| ffmpeg_mux.c | ||
| ffmpeg_mux.h | ||
| ffmpeg_mux_init.c | ||
| ffmpeg_opt.c | ||
| ffmpeg_sched.c | ||
| ffmpeg_sched.h | ||
| ffmpeg_utils.h | ||
| ffplay.c | ||
| ffplay_renderer.c | ||
| ffplay_renderer.h | ||
| ffprobe.c | ||
| fftools.manifest | ||
| fftoolsres.rc | ||
| fopen_utf8.h | ||
| Makefile | ||
| objpool.c | ||
| objpool.h | ||
| opt_common.c | ||
| opt_common.h | ||
| sync_queue.c | ||
| sync_queue.h | ||
| thread_queue.c | ||
| thread_queue.h | ||