[libav-commits] mxfdec: skip to end of structural sets

Philip de Nier git at libav.org
Sun Jan 22 14:47:45 CET 2012


Module: libav
Branch: master
Commit: 0662eea6b0b6a94753ed2fda813de1c3d8692fd8

Author:    Philip de Nier <philip.denier at rd.bbc.co.uk>
Committer: Janne Grunau <janne-libav at jannau.net>
Date:      Mon Sep 12 11:13:44 2011 +0100

mxfdec: skip to end of structural sets

This fixes reading of partition packs. The code stops reading after the
operational pattern and should skip the array of essence container
labels that follow.

Signed-off-by: Janne Grunau <janne-libav at jannau.net>

---

 libavformat/mxfdec.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 33c931e..38e98a3 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1053,8 +1053,11 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
                 int res;
                 if (klv.key[5] == 0x53) {
                     res = mxf_read_local_tags(mxf, &klv, metadata->read, metadata->ctx_size, metadata->type);
-                } else
+                } else {
+                    uint64_t next = avio_tell(s->pb) + klv.length;
                     res = metadata->read(mxf, s->pb, 0, 0, klv.key);
+                    avio_seek(s->pb, next, SEEK_SET);
+                }
                 if (res < 0) {
                     av_log(s, AV_LOG_ERROR, "error reading header metadata\n");
                     return res;



More information about the libav-commits mailing list