aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/dump.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2016-01-02 15:34:04 +0100
committerLuca Barbato <lu_zero@gentoo.org>2016-02-13 14:03:52 +0100
commite579d8b29cdb9b42c50a0fde277dfb047c1466ad (patch)
tree6a366ca300f594ef1eed92e9b5353b46df865b00 /libavformat/dump.c
parentd005ccc630e42daab8ec2afecf972d1551a9401a (diff)
downloadffmpeg-e579d8b29cdb9b42c50a0fde277dfb047c1466ad.tar.gz
lavf: Dump the cpb side data information
Diffstat (limited to 'libavformat/dump.c')
-rw-r--r--libavformat/dump.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libavformat/dump.c b/libavformat/dump.c
index 878eae8c1d..345d2a95fc 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -318,6 +318,22 @@ static void dump_audioservicetype(void *ctx, AVPacketSideData *sd)
}
}
+static void dump_cpb(void *ctx, AVPacketSideData *sd)
+{
+ AVCPBProperties *cpb = (AVCPBProperties *)sd->data;
+
+ if (sd->size < sizeof(*cpb)) {
+ av_log(ctx, AV_LOG_INFO, "invalid data");
+ return;
+ }
+
+ av_log(ctx, AV_LOG_INFO,
+ "bitrate max/min/avg: %d/%d/%d buffer size: %d vbv_delay: %"PRId64,
+ cpb->max_bitrate, cpb->min_bitrate, cpb->avg_bitrate,
+ cpb->buffer_size,
+ cpb->vbv_delay);
+}
+
static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
{
int i;
@@ -362,6 +378,10 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
case AV_PKT_DATA_QUALITY_FACTOR:
av_log(ctx, AV_LOG_INFO, "quality factor: %d", *(int *)sd.data);
break;
+ case AV_PKT_DATA_CPB_PROPERTIES:
+ av_log(ctx, AV_LOG_INFO, "cpb: ");
+ dump_cpb(ctx, &sd);
+ break;
default:
av_log(ctx, AV_LOG_WARNING,
"unknown side data type %d (%d bytes)", sd.type, sd.size);