Ticket #7522: mythtv_ffmpeg_r20504.diff
File mythtv_ffmpeg_r20504.diff, 2.1 KB (added by , 14 years ago) |
---|
-
libs/libavcodec/h264.c
7791 7791 if(!(s->flags2 & CODEC_FLAG2_CHUNKS) || (s->mb_y >= s->mb_height && s->mb_height)){ 7792 7792 Picture *out = s->current_picture_ptr; 7793 7793 Picture *cur = s->current_picture_ptr; 7794 int i, pics, cross_idr,out_of_order, out_idx;7794 int i, pics, out_of_order, out_idx; 7795 7795 7796 7796 field_end(h); 7797 7797 … … 7895 7895 out = h->delayed_pic[i]; 7896 7896 out_idx = i; 7897 7897 } 7898 cross_idr = !!h->delayed_pic[i] || h->delayed_pic[0]->key_frame || h->delayed_pic[0]->mmco_reset; 7898 if(s->avctx->has_b_frames == 0 && (h->delayed_pic[0]->key_frame || h->delayed_pic[0]->mmco_reset)) 7899 h->outputed_poc= INT_MIN; 7900 out_of_order = out->poc < h->outputed_poc; 7899 7901 7900 out_of_order = !cross_idr && out->poc < h->outputed_poc;7901 7902 7902 if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames >= h->sps.num_reorder_frames) 7903 7903 { } 7904 7904 else if((out_of_order && pics-1 == s->avctx->has_b_frames && s->avctx->has_b_frames < MAX_DELAYED_PIC_COUNT) 7905 7905 || (s->low_delay && 7906 (( !cross_idr&& out->poc > h->outputed_poc + 2)7906 ((h->outputed_poc != INT_MIN && out->poc > h->outputed_poc + 2) 7907 7907 || cur->pict_type == FF_B_TYPE))) 7908 7908 { 7909 7909 s->low_delay = 0; … … 7918 7918 if(!out_of_order && pics > s->avctx->has_b_frames){ 7919 7919 *data_size = sizeof(AVFrame); 7920 7920 7921 h->outputed_poc = out->poc; 7921 if(out_idx==0 && h->delayed_pic[0] && (h->delayed_pic[0]->key_frame || h->delayed_pic[0]->mmco_reset)) { 7922 h->outputed_poc = INT_MIN; 7923 } else 7924 h->outputed_poc = out->poc; 7922 7925 *pict= *(AVFrame*)out; 7923 7926 }else{ 7924 7927 av_log(avctx, AV_LOG_DEBUG, "no picture\n");