Hi!

Attached patch improves display of the samples from ticket #4535.

Please comment, Carl Eugen
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 3859810..a6e3b6a 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -834,6 +834,8 @@ static int avi_read_header(AVFormatContext *s)
                                    "BottomUp", 9);
                     }
                     st->codec->height = FFABS(st->codec->height);
+                    if (!st->sample_aspect_ratio.num)
+                        st->display_aspect_ratio = (AVRational){ avih_width, 
avih_height };
 
 //                    avio_skip(pb, size - 5 * 4);
                     break;
@@ -944,6 +946,7 @@ static int avi_read_header(AVFormatContext *s)
                 AVRational active, active_aspect;
 
                 st = s->streams[stream_index];
+                st->display_aspect_ratio = (AVRational){ 0 };
                 avio_rl32(pb);
                 avio_rl32(pb);
                 avio_rl32(pb);
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to