summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-01-26 19:04:32 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-01-26 19:04:32 +0000
commit11a8a71d4e31a15dfbbaf7c63c1b452d8c5bcdcb (patch)
tree97d784eff22b09b1a185638ad79b804920597eda /libavcodec/mpegvideo.c
parente40f5d3c6f1914766bb578f06efcd24f843624fe (diff)
mpeg4 pts fix
Originally committed as revision 2724 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index b6720e0c88..7004a9680b 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -795,6 +795,14 @@ int MPV_encode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_ERROR, "closed gop with scene change detection arent supported yet\n");
return -1;
}
+
+ i= ff_gcd(avctx->frame_rate, avctx->frame_rate_base);
+ if(i > 1){
+ av_log(avctx, AV_LOG_INFO, "removing common factors from framerate\n");
+ avctx->frame_rate /= i;
+ avctx->frame_rate_base /= i;
+// return -1;
+ }
if(s->codec_id==CODEC_ID_MJPEG){
s->intra_quant_bias= 1<<(QUANT_BIAS_SHIFT-1); //(a + x/2)/x