[FFmpeg-cvslog] lavf: extend the avi raw hack to mov

Michael Niedermayer git at videolan.org
Fri May 11 17:03:35 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri May 11 16:53:22 2012 +0200| [75a9479b393a02ffa03436f275ad2b91bd2acd26] | committer: Michael Niedermayer

lavf: extend the avi raw hack to mov

Fixes ticket1194

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=75a9479b393a02ffa03436f275ad2b91bd2acd26
---

 libavformat/utils.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4e26a21..97fdd1c 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3173,8 +3173,11 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
         }
 
         if(s->oformat->codec_tag){
-            if(st->codec->codec_tag && st->codec->codec_id == CODEC_ID_RAWVIDEO && av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id) == 0 && !validate_codec_tag(s, st)){
-                //the current rawvideo encoding system ends up setting the wrong codec_tag for avi, we override it here
+            if(   st->codec->codec_tag
+               && st->codec->codec_id == CODEC_ID_RAWVIDEO
+               && (av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id) == 0 || av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id) ==MKTAG('r', 'a', 'w', ' '))
+               && !validate_codec_tag(s, st)){
+                //the current rawvideo encoding system ends up setting the wrong codec_tag for avi/mov, we override it here
                 st->codec->codec_tag= 0;
             }
             if(st->codec->codec_tag){



More information about the ffmpeg-cvslog mailing list