History

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

Fixes bug 308.

Carl Eugen Hoyos committed 15 years ago

Commit fbcaceb1 parent 19ad5671 file · +3 −2Browse files

Unified · Split

libavformat/mov.c+3−2
@@ -71,10 +71,11 @@ static int mov_metadata_track_or_disc_number(MOVContext *c, AVIOContext *pb, · 70 unmodified lines
71{71{
72 char buf[16];72 char buf[16];
73 73
74 short current, total;74 short current, total = 0;
75 avio_rb16(pb); // unknown75 avio_rb16(pb); // unknown
76 current = avio_rb16(pb);76 current = avio_rb16(pb);
77 total = avio_rb16(pb);77 if (len >= 6)
78 total = avio_rb16(pb);
78 if (!total)79 if (!total)
79 snprintf(buf, sizeof(buf), "%d", current);80 snprintf(buf, sizeof(buf), "%d", current);
80 else81 else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t