+ case AV_CODEC_ID_HEVC:
+ /* Only check for the standardized hvcC version of extradata, keeping
+ * things simple and similar to the avcC/H264 case above, instead
+ * of trying to handle the pre-standardization versions (as in
+ * libavcodec/hevc.c). */
+ if (st->codec->extradata_size > 21 && st->codec->extradata[0] == 1) {
+ s->nal_length_size = (st->codec->extradata[21] & 0x03) + 1;
+ }
+ break;