diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-11-09 01:04:02 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2018-02-20 22:04:12 +0000 |
commit | 1d12a545ce828eaf4fb37295400008ea37635ab8 (patch) | |
tree | cd46b169af902f8fa59d8e9d315af7f2999d7c7c /libavcodec/cbs.c | |
parent | 2651352988212531038326c44754ece1728c4a3b (diff) | |
download | ffmpeg-1d12a545ce828eaf4fb37295400008ea37635ab8.tar.gz |
cbs: Add an explicit type for coded bitstream unit types
Also fix conversion specifiers used for the unit type.
Diffstat (limited to 'libavcodec/cbs.c')
-rw-r--r-- | libavcodec/cbs.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c index fd9baa2997..e5819afce3 100644 --- a/libavcodec/cbs.c +++ b/libavcodec/cbs.c @@ -137,10 +137,10 @@ static int cbs_read_fragment_content(CodedBitstreamContext *ctx, if (err == AVERROR(ENOSYS)) { av_log(ctx->log_ctx, AV_LOG_WARNING, "Decomposition unimplemented for unit %d " - "(type %d).\n", i, frag->units[i].type); + "(type %"PRIu32").\n", i, frag->units[i].type); } else if (err < 0) { av_log(ctx->log_ctx, AV_LOG_ERROR, "Failed to read unit %d " - "(type %d).\n", i, frag->units[i].type); + "(type %"PRIu32").\n", i, frag->units[i].type); return err; } } @@ -225,7 +225,7 @@ int ff_cbs_write_fragment_data(CodedBitstreamContext *ctx, err = ctx->codec->write_unit(ctx, &frag->units[i]); if (err < 0) { av_log(ctx->log_ctx, AV_LOG_ERROR, "Failed to write unit %d " - "(type %d).\n", i, frag->units[i].type); + "(type %"PRIu32").\n", i, frag->units[i].type); return err; } } @@ -421,7 +421,8 @@ static int cbs_insert_unit(CodedBitstreamContext *ctx, int ff_cbs_insert_unit_content(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, - int position, uint32_t type, + int position, + CodedBitstreamUnitType type, void *content) { int err; @@ -443,7 +444,8 @@ int ff_cbs_insert_unit_content(CodedBitstreamContext *ctx, int ff_cbs_insert_unit_data(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, - int position, uint32_t type, + int position, + CodedBitstreamUnitType type, uint8_t *data, size_t data_size) { int err; |