Commit fd374884 authored by michael's avatar michael

mpeg4 pts fix


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2724 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9e995e76
......@@ -2187,9 +2187,11 @@ static void mpeg4_encode_gop_header(MpegEncContext * s){
put_bits(&s->pb, 1, 1);
put_bits(&s->pb, 6, seconds);
put_bits(&s->pb, 1, 0); //closed gov == NO
put_bits(&s->pb, 1, !!(s->flags&CODEC_FLAG_CLOSED_GOP));
put_bits(&s->pb, 1, 0); //broken link == NO
s->last_time_base= s->time_base;
ff_mpeg4_stuffing(&s->pb);
}
......
......@@ -796,6 +796,14 @@ int MPV_encode_init(AVCodecContext *avctx)
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
s->inter_quant_bias= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment