From d9c3e5f6d8aab10a10f9f17fa3c0a207c45b2f54 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 17 Jan 2011 21:38:56 +0100 Subject: Feed the filter chain with the sample aspect ratio from the muxer or codec layer like it has been done prior libavfilter. --- ffmpeg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ffmpeg.c') diff --git a/ffmpeg.c b/ffmpeg.c index 2f8cea1a36..bae4b806c5 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 -- cgit v1.2.3