diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-03 21:29:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-03 21:29:54 +0200 |
commit | d386a523aefe2fed880b5e7d20929e1f65a6e138 (patch) | |
tree | 4c1643b2b8a7ec48530503f657d350bbe91faf89 /libavcodec/hevc.c | |
parent | a7a6194ec4103656bfdeac4616753dde23819a14 (diff) | |
parent | 7693ba0a0eecdcdba71b7fbd9a4a12d1ba7b82aa (diff) | |
download | ffmpeg-d386a523aefe2fed880b5e7d20929e1f65a6e138.tar.gz |
Merge commit '7693ba0a0eecdcdba71b7fbd9a4a12d1ba7b82aa'
* commit '7693ba0a0eecdcdba71b7fbd9a4a12d1ba7b82aa':
hevc: export stream parameters from extradata
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r-- | libavcodec/hevc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 23448a740d..926a19e9d2 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -3375,7 +3375,7 @@ static int hevc_decode_extradata(HEVCContext *s) { AVCodecContext *avctx = s->avctx; GetByteContext gb; - int ret; + int ret, i; bytestream2_init(&gb, avctx->extradata, avctx->extradata_size); @@ -3432,6 +3432,16 @@ static int hevc_decode_extradata(HEVCContext *s) if (ret < 0) return ret; } + + /* export stream parameters from the first SPS */ + for (i = 0; i < FF_ARRAY_ELEMS(s->sps_list); i++) { + if (s->sps_list[i]) { + const HEVCSPS *sps = (const HEVCSPS*)s->sps_list[i]->data; + export_stream_params(s->avctx, s, sps); + break; + } + } + return 0; } |