aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-17 15:12:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-17 15:15:43 +0200
commit291b220377d43adbecc86da84f43aed547957ffc (patch)
tree1ed87946e01e30c2b989c8822503c61ff99ad0c8 /libavformat/mov.c
parent1ad63ff14adb652996c4604da59a330cef0d494e (diff)
parent2f34021d57b1343bb01b377a4797bef7cbc7be3c (diff)
downloadffmpeg-291b220377d43adbecc86da84f43aed547957ffc.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: avconv: flush filtered frames before reconfiguring filters mov: stsd entries must be at least 16 byte mov: detect EOF in mov_read_dref() file: return proper error on seek failures Conflicts: libavformat/file.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 078bd3f8ea..0bcdb21b88 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1204,16 +1204,16 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
int dref_id = 1;
MOVAtom a = { AV_RL32("stsd") };
int64_t start_pos = avio_tell(pb);
- int size = avio_rb32(pb); /* size */
+ int64_t size = avio_rb32(pb); /* size */
uint32_t format = avio_rl32(pb); /* data format */
if (size >= 16) {
avio_rb32(pb); /* reserved */
avio_rb16(pb); /* reserved */
dref_id = avio_rb16(pb);
- }else if (size <= 0){
+ }else if (size <= 7){
av_log(c->fc, AV_LOG_ERROR, "invalid size %d in stsd\n", size);
- return -1;
+ return AVERROR_INVALIDDATA;
}
if (st->codec->codec_tag &&