Ticket #88: fix-no-b-v2.patch

File fix-no-b-v2.patch, 605 bytes (added by mjs973, 6 years ago)

Fix for h264 I-P only input to decoder

  • libavcodec/h264.c

    diff --git a/libavcodec/h264.c b/libavcodec/h264.c
    index 6cd597e..a40afbc 100644
    a b static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ 
    34133413            init_get_bits(&s->gb, ptr, bit_length); 
    34143414            ff_h264_decode_seq_parameter_set(h); 
    34153415 
    3416             if(s->flags& CODEC_FLAG_LOW_DELAY) 
     3416            if(s->flags& CODEC_FLAG_LOW_DELAY || 
     3417              (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames)) 
    34173418                s->low_delay=1; 
    34183419 
    34193420            if(avctx->has_b_frames < 2)