Commit c67aa7f2 authored by Clément Bœsch's avatar Clément Bœsch

Merge commit '187d7197'

* commit '187d7197':
  h264: Support AV_PKT_DATA_NEW_EXTRADATA
Merged-by: 's avatarClément Bœsch <u@pkh.me>
parents 46bd0e8e 187d7197
......@@ -1235,6 +1235,8 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data,
H264Picture *out;
int i, out_idx;
int ret;
const uint8_t *new_extradata;
int new_extradata_size;
h->flags = avctx->flags;
h->setup_finished = 0;
......@@ -1302,6 +1304,17 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data,
avctx->err_recognition, avctx);
}
new_extradata_size = 0;
new_extradata = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA,
&new_extradata_size);
if (new_extradata_size > 0 && new_extradata) {
ret = ff_h264_decode_extradata(new_extradata, new_extradata_size,
&h->ps, &h->is_avc, &h->nal_length_size,
avctx->err_recognition, avctx);
if (ret < 0)
return ret;
}
buf_index = decode_nal_units(h, buf, buf_size);
if (buf_index < 0)
return AVERROR_INVALIDDATA;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment