[FFmpeg-cvslog] avcodec/cfhd: improve SampleIndex tag output

Paul B Mahol git at videolan.org
Sun Aug 9 19:49:04 EEST 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Aug  9 13:26:55 2020 +0200| [4ad77086b96b2bf2f801993e3637297fa43a412c] | committer: Paul B Mahol

avcodec/cfhd: improve SampleIndex tag output

This tag is used for jumping to different channels in bitstream.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ad77086b96b2bf2f801993e3637297fa43a412c
---

 libavcodec/cfhd.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index a7390327bf..1d7f964e34 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -566,16 +566,15 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
             av_log(avctx, AV_LOG_DEBUG, "Frame index %"PRIu16"\n", data);
             s->frame_index = data;
         } else if (tag == SampleIndexTable) {
-            av_log(avctx, AV_LOG_DEBUG, "tag=2 header - skipping %i tag/value pairs\n", data);
+            av_log(avctx, AV_LOG_DEBUG, "Sample index table - skipping %i values\n", data);
             if (data > bytestream2_get_bytes_left(&gb) / 4) {
-                av_log(avctx, AV_LOG_ERROR, "too many tag/value pairs (%d)\n", data);
+                av_log(avctx, AV_LOG_ERROR, "too many values (%d)\n", data);
                 ret = AVERROR_INVALIDDATA;
                 break;
             }
             for (i = 0; i < data; i++) {
-                uint16_t tag2 = bytestream2_get_be16(&gb);
-                uint16_t val2 = bytestream2_get_be16(&gb);
-                av_log(avctx, AV_LOG_DEBUG, "Tag/Value = %x %x\n", tag2, val2);
+                uint32_t offset = bytestream2_get_be32(&gb);
+                av_log(avctx, AV_LOG_DEBUG, "Offset = %"PRIu32"\n", offset);
             }
         } else if (tag == HighpassWidth) {
             av_log(avctx, AV_LOG_DEBUG, "Highpass width %i channel %i level %i subband %i\n", data, s->channel_num, s->level, s->subband_num);



More information about the ffmpeg-cvslog mailing list