On Mon, 25 Jun 2012, Anton Khirnov wrote:

From: Carl Eugen Hoyos <[email protected]>

Fixes bug 308.

Signed-off-by: Anton Khirnov <[email protected]>
---
libavformat/mov.c |    5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index c564c67..8434da0 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -71,10 +71,11 @@ static int mov_metadata_track_or_disc_number(MOVContext *c, 
AVIOContext *pb,
{
    char buf[16];

-    short current, total;
+    short current, total = 0;
    avio_rb16(pb); // unknown
    current = avio_rb16(pb);
-    total = avio_rb16(pb);
+    if (len >= 6)
+        total = avio_rb16(pb);
    if (!total)
        snprintf(buf, sizeof(buf), "%d", current);
    else
--
1.7.10

Ok

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to