summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/hevc_parser.c')
-rw-r--r--libavcodec/hevc_parser.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
index 59893bb3e1..71887a8e91 100644
--- a/libavcodec/hevc_parser.c
+++ b/libavcodec/hevc_parser.c
@@ -24,6 +24,7 @@
#include "golomb.h"
#include "hevc.h"
+#include "h2645_parse.h"
#include "parser.h"
#define START_CODE 0x000001 ///< start_code_prefix_one_3bytes
@@ -35,7 +36,7 @@
typedef struct HEVCParserContext {
ParseContext pc;
- HEVCPacket pkt;
+ H2645Packet pkt;
HEVCParamSets ps;
int parsed_extradata;
@@ -46,7 +47,7 @@ typedef struct HEVCParserContext {
} HEVCParserContext;
#if !ADVANCED_PARSER
-static int hevc_parse_slice_header(AVCodecParserContext *s, HEVCNAL *nal,
+static int hevc_parse_slice_header(AVCodecParserContext *s, H2645NAL *nal,
AVCodecContext *avctx)
{
HEVCParserContext *ctx = s->priv_data;
@@ -88,12 +89,12 @@ static int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
HEVCParserContext *ctx = s->priv_data;
int ret, i;
- ret = ff_hevc_split_packet(NULL, &ctx->pkt, buf, buf_size, avctx, 0, 0);
+ ret = ff_h2645_split_packet(&ctx->pkt, buf, buf_size, avctx, 0, 0);
if (ret < 0)
return ret;
for (i = 0; i < ctx->pkt.nb_nals; i++) {
- HEVCNAL *nal = &ctx->pkt.nals[i];
+ H2645NAL *nal = &ctx->pkt.nals[i];
/* ignore everything except parameter sets and VCL NALUs */
switch (nal->type) {
@@ -189,10 +190,10 @@ static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
GetBitContext *gb;
SliceHeader *sh = &h->sh;
HEVCParamSets *ps = &h->ps;
- HEVCPacket *pkt = &ctx->pkt;
+ H2645Packet *pkt = &ctx->pkt;
const uint8_t *buf_end = buf + buf_size;
int state = -1, i;
- HEVCNAL *nal;
+ H2645NAL *nal;
int is_global = buf == avctx->extradata;
if (!h->HEVClc)
@@ -213,7 +214,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
return 0;
if (pkt->nals_allocated < 1) {
- HEVCNAL *tmp = av_realloc_array(pkt->nals, 1, sizeof(*tmp));
+ H2645NAL *tmp = av_realloc_array(pkt->nals, 1, sizeof(*tmp));
if (!tmp)
return AVERROR(ENOMEM);
pkt->nals = tmp;
@@ -239,7 +240,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
src_length = 20;
}
- consumed = ff_hevc_extract_rbsp(buf, src_length, nal);
+ consumed = ff_h2645_extract_rbsp(buf, src_length, nal);
if (consumed < 0)
return consumed;