aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-04-02 14:35:03 -0300
committerJames Almer <jamrial@gmail.com>2017-04-07 17:23:57 -0300
commite7fb6bc32d1bbffbc1a466c2a505b138cf8a7e0e (patch)
tree964134455e1d60fb7f88c5f0a41fa5d71bde5fd8
parentb8f26779d615dfb466e90627323b1a4e40639f76 (diff)
downloadffmpeg-e7fb6bc32d1bbffbc1a466c2a505b138cf8a7e0e.tar.gz
avcodec/hevc_parse: ignore all non parameter set NAL units in extradata
While they shouldn't be present, they are harmless if they are. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/hevc_parse.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/libavcodec/hevc_parse.c b/libavcodec/hevc_parse.c
index 6c1138e015..3fe6662be6 100644
--- a/libavcodec/hevc_parse.c
+++ b/libavcodec/hevc_parse.c
@@ -41,25 +41,8 @@ static int hevc_decode_nal_units(const uint8_t *buf, int buf_size, HEVCParamSets
case HEVC_NAL_VPS: ff_hevc_decode_nal_vps(&nal->gb, logctx, ps); break;
case HEVC_NAL_SPS: ff_hevc_decode_nal_sps(&nal->gb, logctx, ps, 1); break;
case HEVC_NAL_PPS: ff_hevc_decode_nal_pps(&nal->gb, logctx, ps); break;
- case HEVC_NAL_TRAIL_R:
- case HEVC_NAL_TRAIL_N:
- case HEVC_NAL_TSA_N:
- case HEVC_NAL_TSA_R:
- case HEVC_NAL_STSA_N:
- case HEVC_NAL_STSA_R:
- case HEVC_NAL_BLA_W_LP:
- case HEVC_NAL_BLA_W_RADL:
- case HEVC_NAL_BLA_N_LP:
- case HEVC_NAL_IDR_W_RADL:
- case HEVC_NAL_IDR_N_LP:
- case HEVC_NAL_CRA_NUT:
- case HEVC_NAL_RADL_N:
- case HEVC_NAL_RADL_R:
- case HEVC_NAL_RASL_N:
- case HEVC_NAL_RASL_R:
- av_log(logctx, AV_LOG_ERROR, "Invalid NAL unit: %d\n", nal->type);
- ret = AVERROR_INVALIDDATA;
- goto done;
+ default:
+ av_log(logctx, AV_LOG_VERBOSE, "Ignoring NAL type %d in extradata\n", nal->type);
break;
}
}