|
|
@ -2209,6 +2209,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ |
|
|
|
h->outputed_poc = INT_MIN; |
|
|
|
h->outputed_poc = INT_MIN; |
|
|
|
h->prev_poc_msb= 1<<16; |
|
|
|
h->prev_poc_msb= 1<<16; |
|
|
|
h->sei_recovery_frame_cnt = -1; |
|
|
|
h->sei_recovery_frame_cnt = -1; |
|
|
|
|
|
|
|
h->sei_dpb_output_delay = 0; |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3144,6 +3145,7 @@ static void flush_dpb(AVCodecContext *avctx){ |
|
|
|
h->s.current_picture_ptr->reference= 0; |
|
|
|
h->s.current_picture_ptr->reference= 0; |
|
|
|
h->s.first_field= 0; |
|
|
|
h->s.first_field= 0; |
|
|
|
h->sei_recovery_frame_cnt = -1; |
|
|
|
h->sei_recovery_frame_cnt = -1; |
|
|
|
|
|
|
|
h->sei_dpb_output_delay = 0; |
|
|
|
ff_mpeg_flush(avctx); |
|
|
|
ff_mpeg_flush(avctx); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -6782,7 +6784,7 @@ static int decode_picture_timing(H264Context *h){ |
|
|
|
MpegEncContext * const s = &h->s; |
|
|
|
MpegEncContext * const s = &h->s; |
|
|
|
if(h->sps.nal_hrd_parameters_present_flag || h->sps.vcl_hrd_parameters_present_flag){ |
|
|
|
if(h->sps.nal_hrd_parameters_present_flag || h->sps.vcl_hrd_parameters_present_flag){ |
|
|
|
skip_bits(&s->gb, h->sps.cpb_removal_delay_length); /* cpb_removal_delay */ |
|
|
|
skip_bits(&s->gb, h->sps.cpb_removal_delay_length); /* cpb_removal_delay */ |
|
|
|
skip_bits(&s->gb, h->sps.dpb_output_delay_length); /* dpb_output_delay */ |
|
|
|
h->sei_dpb_output_delay = get_bits(&s->gb, h->sps.dpb_output_delay_length); |
|
|
|
} |
|
|
|
} |
|
|
|
if(h->sps.pic_struct_present_flag){ |
|
|
|
if(h->sps.pic_struct_present_flag){ |
|
|
|
unsigned int i, num_clock_ts; |
|
|
|
unsigned int i, num_clock_ts; |
|
|
@ -7691,6 +7693,7 @@ static int decode_frame(AVCodecContext *avctx, |
|
|
|
|
|
|
|
|
|
|
|
MPV_frame_end(s); |
|
|
|
MPV_frame_end(s); |
|
|
|
h->sei_recovery_frame_cnt = -1; |
|
|
|
h->sei_recovery_frame_cnt = -1; |
|
|
|
|
|
|
|
h->sei_dpb_output_delay = 0; |
|
|
|
|
|
|
|
|
|
|
|
if (cur->field_poc[0]==INT_MAX || cur->field_poc[1]==INT_MAX) { |
|
|
|
if (cur->field_poc[0]==INT_MAX || cur->field_poc[1]==INT_MAX) { |
|
|
|
/* Wait for second field. */ |
|
|
|
/* Wait for second field. */ |
|
|
|