Commit fbcaceb1 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos Committed by Anton Khirnov

mov: do not try to read total disc/track number if data atom is too short.

Fixes bug 308.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 19ad5673
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment