Browse Source

CODEC_FLAG_LOW_DELAY fix

Originally committed as revision 2016 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 22 years ago
parent
commit
e056044824
2 changed files with 4 additions and 1 deletions
  1. +1
    -1
      libavcodec/h263.c
  2. +3
    -0
      libavcodec/mpeg12.c

+ 1
- 1
libavcodec/h263.c View File

@@ -4648,7 +4648,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
int time_incr, time_increment;

s->pict_type = get_bits(gb, 2) + I_TYPE; /* pict type: I = 0 , P = 1 */
if(s->pict_type==B_TYPE && s->low_delay && s->vol_control_parameters==0){
if(s->pict_type==B_TYPE && s->low_delay && s->vol_control_parameters==0 && !(s->flags & CODEC_FLAG_LOW_DELAY)){
printf("low_delay flag set, but shouldnt, clearing it\n");
s->low_delay=0;
}


+ 3
- 0
libavcodec/mpeg12.c View File

@@ -1653,7 +1653,10 @@ static void mpeg_decode_sequence_extension(MpegEncContext *s)
s->bit_rate = ((s->bit_rate / 400) | (bit_rate_ext << 12)) * 400;
skip_bits1(&s->gb); /* marker */
vbv_buf_ext = get_bits(&s->gb, 8);

s->low_delay = get_bits1(&s->gb);
if(s->flags & CODEC_FLAG_LOW_DELAY) s->low_delay=1;

frame_rate_ext_n = get_bits(&s->gb, 2);
frame_rate_ext_d = get_bits(&s->gb, 5);
av_reduce(


Loading…
Cancel
Save