[FFmpeg-devel] [PATCH]lavf/mov: Set display aspect ratio for avid dv

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Feb 29 11:52:24 CET 2016


Hi!

Attached patch fixes ticket #5271 for me.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 043f4a9..888b2ad 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1461,6 +1461,11 @@ static int mov_read_ares(MOVContext *c, AVIOContext *pb, MOVAtom atom)
             if (avio_rb16(pb) == 0xd4d)
                 codec->width = 1440;
             return 0;
+        } else if (codec->codec_tag == MKTAG('A', 'V', 'd', '1') &&
+                   atom.size >= 24) {
+            avio_skip(pb, 12);
+            c->fc->streams[c->fc->nb_streams-1]->display_aspect_ratio.num = avio_rb32(pb);
+            c->fc->streams[c->fc->nb_streams-1]->display_aspect_ratio.den = avio_rb32(pb) * avio_rb32(pb);
         }
     }
 


More information about the ffmpeg-devel mailing list