diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-05-28 12:31:40 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-05-28 12:31:40 +0200 |
commit | 57eecd9e4f8d68277b937c6ea9924fa3a4524fe4 (patch) | |
tree | f947a13c957418385f668760f7f08554a7542bd8 /libavformat/utils.c | |
parent | bcd7bf7eeb09a395cc01698842d1b8be9af483fc (diff) | |
download | ffmpeg-57eecd9e4f8d68277b937c6ea9924fa3a4524fe4.tar.gz |
lavf: Use av_codec_get_tag2() in avformat_query_codec().
av_codec_get_tag() can return 0 both in case of error and success.
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index db2b4f6768..7af2aabd80 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4107,10 +4107,11 @@ int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance) { if (ofmt) { + unsigned int codec_tag; if (ofmt->query_codec) return ofmt->query_codec(codec_id, std_compliance); else if (ofmt->codec_tag) - return !!av_codec_get_tag(ofmt->codec_tag, codec_id); + return !!av_codec_get_tag2(ofmt->codec_tag, codec_id, &codec_tag); else if (codec_id == ofmt->video_codec || codec_id == ofmt->audio_codec || codec_id == ofmt->subtitle_codec) |