ff_hevc_reset_sei(sei);
ret = ff_h2645_packet_split(&ctx->pkt, buf, buf_size, avctx, ctx->is_avc,
- ctx->nal_length_size, AV_CODEC_ID_HEVC, 1);
+ ctx->nal_length_size, AV_CODEC_ID_HEVC, 1, 0);
if (ret < 0)
return ret;
H2645NAL *nal = &ctx->pkt.nals[i];
GetBitContext *gb = &nal->gb;
+ if (nal->nuh_layer_id > 0)
+ continue;
+
switch (nal->type) {
case HEVC_NAL_VPS:
ff_hevc_decode_nal_vps(gb, avctx, ps);
case HEVC_NAL_RADL_R:
case HEVC_NAL_RASL_N:
case HEVC_NAL_RASL_R:
+ if (ctx->sei.picture_timing.picture_struct == HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING) {
+ s->repeat_pict = 1;
+ } else if (ctx->sei.picture_timing.picture_struct == HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING) {
+ s->repeat_pict = 2;
+ }
ret = hevc_parse_slice_header(s, nal, avctx);
if (ret)
return ret;
}
}
/* didn't find a picture! */
- av_log(avctx, AV_LOG_ERROR, "missing picture in access unit\n");
+ av_log(avctx, AV_LOG_ERROR, "missing picture in access unit with size %d\n", buf_size);
return -1;
}