X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fh264.c;h=edd34aef5f406d9d55314390181811f34a505734;hb=e3fb8ac9564b6a3d86c5f60c940f2056a4faae56;hp=efce095da060f51c5e7885dc3604e6217db73ba5;hpb=82070b01b85f200ec1a76064159f82626c167c12;p=ffmpeg diff --git a/libavcodec/h264.c b/libavcodec/h264.c index efce095da06..edd34aef5f4 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -478,10 +478,10 @@ int ff_h264_check_intra4x4_pred_mode(H264Context *h) */ int ff_h264_check_intra_pred_mode(H264Context *h, int mode, int is_chroma) { - static const int8_t top[7] = { LEFT_DC_PRED8x8, 1, -1, -1 }; - static const int8_t left[7] = { TOP_DC_PRED8x8, -1, 2, -1, DC_128_PRED8x8 }; + static const int8_t top[4] = { LEFT_DC_PRED8x8, 1, -1, -1 }; + static const int8_t left[5] = { TOP_DC_PRED8x8, -1, 2, -1, DC_128_PRED8x8 }; - if (mode > 6U) { + if (mode > 3U) { av_log(h->avctx, AV_LOG_ERROR, "out of range intra chroma pred mode at %d %d\n", h->mb_x, h->mb_y); @@ -4287,7 +4287,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) avctx->codec_id != AV_CODEC_ID_H264 || (CONFIG_GRAY && (h->flags & CODEC_FLAG_GRAY)); - if (!(h->avctx->active_thread_type & FF_THREAD_SLICE) && h->picture_structure == PICT_FRAME) { + if (!(h->avctx->active_thread_type & FF_THREAD_SLICE) && h->picture_structure == PICT_FRAME && h->er.error_status_table) { const int start_i = av_clip(h->resync_mb_x + h->resync_mb_y * h->mb_width, 0, h->mb_num - 1); if (start_i) { int prev_status = h->er.error_status_table[h->er.mb_index2xy[start_i - 1]]; @@ -4777,7 +4777,7 @@ again: break; case NAL_SPS: init_get_bits(&h->gb, ptr, bit_length); - if (ff_h264_decode_seq_parameter_set(h) < 0 && (h->is_avc ? (nalsize != consumed) && nalsize : 1)) { + if (ff_h264_decode_seq_parameter_set(h) < 0 && (h->is_avc ? nalsize : 1)) { av_log(h->avctx, AV_LOG_DEBUG, "SPS decoding failure, trying again with the complete NAL\n"); if (h->is_avc)