summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-04-30 12:17:16 +0200
committerAnton Khirnov <anton@khirnov.net>2023-05-08 10:38:59 +0200
commitc7c73a3250542dde9bb882867f1b2d9af61cc5a0 (patch)
tree628e23515214716bafd4688e6be52031f0ac47ba /fftools/ffmpeg.h
parent48d8d3549a1b97d6f811b7d0bed8b0fdb6a0dc6d (diff)
downloadffmpeg-c7c73a3250542dde9bb882867f1b2d9af61cc5a0.tar.gz
fftools/ffmpeg_filter: take fallback parameters from decoder, not demuxer
When an input stream terminates and no frames were successfully decoded, filtering code will currently configure the filtergraph using demuxer stream parameters. Use decoder parameters instead, which should be more reliable. Also, initialize them immediately when an input stream is bound to a filtergraph input, so that these parameters are always available (if at all) and filtering code does not need to reach into the decoder at some arbitrary later point.
Diffstat (limited to 'fftools/ffmpeg.h')
-rw-r--r--fftools/ffmpeg.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index b30f0758ec..602005f071 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -788,7 +788,13 @@ void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub);
int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame, int keep_reference);
int ifilter_send_eof(InputFilter *ifilter, int64_t pts, AVRational tb);
-int ifilter_parameters_from_codecpar(InputFilter *ifilter, AVCodecParameters *par);
+/**
+ * Set up fallback filtering parameters from a decoder context. They will only
+ * be used if no frames are ever sent on this input, otherwise the actual
+ * parameters are taken from the frame.
+ */
+int ifilter_parameters_from_dec(InputFilter *ifilter, const AVCodecContext *dec);
+
int ifilter_has_all_input_formats(FilterGraph *fg);
/**