summaryrefslogtreecommitdiffstats
path: root/libavformat/framecrcenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-06 18:17:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-06 18:17:27 +0100
commit864fdfa0627e21ee0b69e957c3413114185623a7 (patch)
tree96b5ce2a2e9ed1e1db11839ca30d45d0a5018a45 /libavformat/framecrcenc.c
parentb2c44319448478a113b0d7935ca084839827131c (diff)
downloadffmpeg-streaming-864fdfa0627e21ee0b69e957c3413114185623a7.zip
ffmpeg-streaming-864fdfa0627e21ee0b69e957c3413114185623a7.tar.gz
framecrcenc: print all side data elements, not just the first
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/framecrcenc.c')
-rw-r--r--libavformat/framecrcenc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c
index 29960f9..92f2e91 100644
--- a/libavformat/framecrcenc.c
+++ b/libavformat/framecrcenc.c
@@ -34,11 +34,15 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
if (pkt->flags != AV_PKT_FLAG_KEY)
av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
if (pkt->side_data_elems) {
- uint32_t side_data_crc = av_adler32_update(0,
- pkt->side_data->data,
- pkt->side_data->size);
+ int i;
av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);
- av_strlcatf(buf, sizeof(buf), ", %8d, 0x%08x", pkt->side_data->size, side_data_crc);
+
+ for (i=0; i<pkt->side_data_elems; i++) {
+ uint32_t side_data_crc = av_adler32_update(0,
+ pkt->side_data[i].data,
+ pkt->side_data[i].size);
+ av_strlcatf(buf, sizeof(buf), ", %8d, 0x%08x", pkt->side_data[i].size, side_data_crc);
+ }
}
av_strlcatf(buf, sizeof(buf), "\n");
avio_write(s->pb, buf, strlen(buf));
OpenPOWER on IntegriCloud