[FFmpeg-devel] [PATCH]Use av_codec_get_tag2() in avformat_query_codec()

Carl Eugen Hoyos cehoyos at ag.or.at
Thu May 28 02:33:08 CEST 2015


Hi!

I believe that attached patch - that I don't really know how to test - fixes a 
theoretical issue with rawvideo.

Please review, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/utils.c b/libavformat/utils.c
index db2b4f6..c21e826 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)


More information about the ffmpeg-devel mailing list