[FFmpeg-devel] [PATCH] avformat/utils: force native h264 decoder for probing

Michael Niedermayer michael at niedermayer.cc
Thu Sep 22 00:03:18 EEST 2016


On Wed, Sep 21, 2016 at 07:01:34PM +0200, Timo Rothenpieler wrote:
> ---
>  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

This is also used by av_find_best_stream()  (which returns a AVCodec
as well)

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160921/b8bfcdb1/attachment.sig>


More information about the ffmpeg-devel mailing list