[FFmpeg-devel] [PATCH] lavf/utils: Fixing skip samples to adhere to side data format

Vignesh Venkatasubramanian vigneshv at google.com
Wed Sep 4 19:45:01 CEST 2013


Fixing the skip samples code in utils.c to stick to the specified
side data format for AV_PKT_DATA_SKIP_SAMPLES. As of now, only the
first 4 bytes are written to while the next 4 bytes could be junk.
Setting that to 0.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv at google.com>
---
 libavformat/utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 763588b..095f263 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1479,6 +1479,7 @@ return_packet:
     if (st->skip_samples) {
         uint8_t *p = av_packet_new_side_data(pkt, AV_PKT_DATA_SKIP_SAMPLES, 10);
         AV_WL32(p, st->skip_samples);
+        AV_WL32(p + 4, 0);
         av_log(s, AV_LOG_DEBUG, "demuxer injecting skip %d\n", st->skip_samples);
         st->skip_samples = 0;
     }
-- 
1.8.4



More information about the ffmpeg-devel mailing list