summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-10-31 22:22:11 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-10-31 22:22:11 +0000
commit7aba918708f60ad599b259778abe4ebbd79dbb2a (patch)
treea827ff246ae7a6314d6ead4575026a9404718020 /libavcodec/mpegvideo.c
parente240ee678cb534eadf61be98f3c08c61b34ea4ad (diff)
fix 1/0 b frames + CBR bug
Originally committed as revision 6850 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 47a9514aa1..576a6b8acc 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2542,6 +2542,10 @@ vbv_retry:
if(s->flipflop_rounding || s->codec_id == CODEC_ID_H263P || s->codec_id == CODEC_ID_MPEG4)
s->no_rounding ^= 1;
}
+ if(s->pict_type!=B_TYPE){
+ s->time_base= s->last_time_base;
+ s->last_non_b_time= s->time - s->pp_time;
+ }
// av_log(NULL, AV_LOG_ERROR, "R:%d ", s->next_lambda);
for(i=0; i<avctx->thread_count; i++){
PutBitContext *pb= &s->thread_context[i]->pb;