ffmpeg: reduce frame rate for mpeg4 to be within the spec limits
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 19 Feb 2014 17:36:00 +0000 (18:36 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 19 Feb 2014 17:40:27 +0000 (18:40 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index 6a51810..1369fda 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2508,6 +2508,10 @@ static int transcode_init(void)
                     int idx = av_find_nearest_q_idx(ost->frame_rate, ost->enc->supported_framerates);
                     ost->frame_rate = ost->enc->supported_framerates[idx];
                 }
+                if (codec->codec_id == AV_CODEC_ID_MPEG4) {
+                    av_reduce(&ost->frame_rate.num, &ost->frame_rate.den,
+                              ost->frame_rate.num, ost->frame_rate.den, 65535);
+                }
             }
 
             switch (codec->codec_type) {