diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-01-17 21:38:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-01-17 23:22:42 +0100 |
commit | d9c3e5f6d8aab10a10f9f17fa3c0a207c45b2f54 (patch) | |
tree | 078a8aea6a748f876cb167e80b49b9cbcf4082dc /ffmpeg.c | |
parent | ab03382fee93e3a1d9423e9c2100b42d676eead9 (diff) | |
download | ffmpeg-d9c3e5f6d8aab10a10f9f17fa3c0a207c45b2f54.tar.gz |
Feed the filter chain with the sample aspect ratio from the muxer or codec layer
like it has been done prior libavfilter.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |