diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-11-02 12:03:18 -0400 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-11-08 11:22:29 -0500 |
commit | 47a795727f5433f5238a8a244cf181f61ea5af2c (patch) | |
tree | 8874ad1cca517b4938de94746c8ecbe6e0480b6f /libavcodec/hevcdec.c | |
parent | 2fe30b4743c0f4c3bdf37b91ae534cafa85e4036 (diff) | |
download | ffmpeg-47a795727f5433f5238a8a244cf181f61ea5af2c.tar.gz |
hevc: Support extradata changes from multiple stsd
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/hevcdec.c')
-rw-r--r-- | libavcodec/hevcdec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index d9463370bc..5f1b5c3c4a 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -2774,6 +2774,8 @@ static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output, AVPacket *avpkt) { int ret; + int new_extradata_size; + uint8_t *new_extradata; HEVCContext *s = avctx->priv_data; if (!avpkt->size) { @@ -2785,6 +2787,14 @@ static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output, return 0; } + new_extradata = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA, + &new_extradata_size); + if (new_extradata && new_extradata_size > 0) { + ret = hevc_decode_extradata(s, new_extradata, new_extradata_size); + if (ret < 0) + return ret; + } + s->ref = NULL; ret = decode_nal_units(s, avpkt->data, avpkt->size); if (ret < 0) |