[SCM] libav/experimental: Feed the filter chain with the sample aspect ratio from the muxer or codec layer like it has been done prior libavfilter.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:22:09 UTC 2013


The following commit has been merged in the experimental branch:
commit d9c3e5f6d8aab10a10f9f17fa3c0a207c45b2f54
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Mon Jan 17 21:38:56 2011 +0100

    Feed the filter chain with the sample aspect ratio from the muxer or codec layer
    like it has been done prior libavfilter.

diff --git a/ffmpeg.c b/ffmpeg.c
index 2f8cea1..bae4b80 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1607,10 +1607,13 @@ static int output_packet(AVInputStream *ist, int ist_index,
 
 #if CONFIG_AVFILTER
         if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ist->input_video_filter) {
+            AVRational sar;
+            if (ist->st->sample_aspect_ratio.num) sar = ist->st->sample_aspect_ratio;
+            else                                  sar = ist->st->codec->sample_aspect_ratio;
             // add it to be filtered
             av_vsrc_buffer_add_frame(ist->input_video_filter, &picture,
                                      ist->pts,
-                                     ist->st->codec->sample_aspect_ratio);
+                                     sar);
         }
 #endif
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list