aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-15 00:14:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-15 00:40:36 +0200
commit1b8f4d773c4d3bfcff9cdbc26200afbbaa445bc3 (patch)
treecf55621b8c5a15623f9134a2a1daf17009807a4f
parenta63d7213b3eb96a35fdf34b05f45e5675107d8f9 (diff)
downloadffmpeg-1b8f4d773c4d3bfcff9cdbc26200afbbaa445bc3.tar.gz
ffmpeg: use framerate not fieldrate as filter input.
Fixes a problem described in Ticket1065 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffmpeg_filter.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ffmpeg_filter.c b/ffmpeg_filter.c
index 436cdf27d2..d0f25d82ad 100644
--- a/ffmpeg_filter.c
+++ b/ffmpeg_filter.c
@@ -558,6 +558,13 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
int pad_idx = in->pad_idx;
int ret;
+ if (!ist->framerate.num) {
+ AVRational codec_fr = av_inv_q(ist->st->codec->time_base);
+ codec_fr.den *= ist->st->codec->ticks_per_frame;
+ if(av_q2d(codec_fr) < av_q2d(fr)*0.7)
+ fr = codec_fr;
+ }
+
if (ist->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
ret = sub2video_prepare(ist);
if (ret < 0)