Mercurial > libavcodec.hg
changeset 1760:ebe7fa49ddcc libavcodec
mpeg4 pts fix
author | michael |
---|---|
date | Mon, 26 Jan 2004 19:04:32 +0000 |
parents | e73a3b86565f |
children | 3620e301643a |
files | h263.c mpegvideo.c |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/h263.c Sun Jan 25 16:43:09 2004 +0000 +++ b/h263.c Mon Jan 26 19:04:32 2004 +0000 @@ -2187,8 +2187,10 @@ 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); }
--- a/mpegvideo.c Sun Jan 25 16:43:09 2004 +0000 +++ b/mpegvideo.c Mon Jan 26 19:04:32 2004 +0000 @@ -795,6 +795,14 @@ 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