[FFmpeg-devel] [PATCH] avformat/utils: force native h264 decoder for probing
Timo Rothenpieler
timo at rothenpieler.org
Wed Sep 21 20:01:34 EEST 2016
---
libavformat/utils.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index a9bd034..4c5340b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -164,6 +164,13 @@ int ff_copy_whiteblacklists(AVFormatContext *dst, const AVFormatContext *src)
static const AVCodec *find_decoder(AVFormatContext *s, const AVStream *st, enum AVCodecID codec_id)
{
+#if CONFIG_H264_DECODER
+ /* Other parts of the code assume this decoder to be used for h264,
+ * so force it if possible. */
+ if (codec_id == AV_CODEC_ID_H264)
+ return avcodec_find_decoder_by_name("h264");
+#endif
+
#if FF_API_LAVF_AVCTX
FF_DISABLE_DEPRECATION_WARNINGS
if (st->codec->codec)
--
2.10.0
More information about the ffmpeg-devel
mailing list