diff options
author | Yusuke Nakamura <muken.the.vfrmaniac@gmail.com> | 2013-10-27 11:07:43 +0100 |
---|---|---|
committer | Mickaƫl Raulet <mraulet@insa-rennes.fr> | 2013-10-27 11:07:43 +0100 |
commit | afa93d198aaf2cc661c4df6d4095cd030265d30a (patch) | |
tree | 4352ab42b169d3ca4f8d54eb12dda9eec1952a76 /libavcodec/hevc.c | |
parent | f7f88018393b96ae410041e9a0fc51f4c082002e (diff) | |
download | ffmpeg-afa93d198aaf2cc661c4df6d4095cd030265d30a.tar.gz |
hevc_parser: Set pict_type, key_frame and output_picture_number.
Conflicts:
libavcodec/hevc.c
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r-- | libavcodec/hevc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 9a8886735e..aa174b227e 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2192,8 +2192,8 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t *nal, int length) /* FIXME: This is adapted from ff_h264_decode_nal, avoiding duplication between these functions would be nice. */ -static int extract_rbsp(HEVCContext *s, const uint8_t *src, int length, - HEVCNAL *nal) +int ff_hevc_extract_rbsp(HEVCContext *s, const uint8_t *src, int length, + HEVCNAL *nal) { int i, si, di; uint8_t *dst; @@ -2279,7 +2279,8 @@ static int extract_rbsp(HEVCContext *s, const uint8_t *src, int length, if (!s->skipped_bytes_pos) return AVERROR(ENOMEM); } - s->skipped_bytes_pos[s->skipped_bytes-1] = di - 1; + if (s->skipped_bytes_pos) + s->skipped_bytes_pos[s->skipped_bytes-1] = di - 1; continue; } else // next start code goto nsc; @@ -2363,7 +2364,7 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) s->skipped_bytes_pos = s->skipped_bytes_pos_nal[s->nb_nals]; nal = &s->nals[s->nb_nals]; - consumed = extract_rbsp(s, buf, extract_length, nal); + consumed = ff_hevc_extract_rbsp(s, buf, extract_length, nal); s->skipped_bytes_nal[s->nb_nals] = s->skipped_bytes; s->skipped_bytes_pos_size_nal[s->nb_nals] = s->skipped_bytes_pos_size; |