projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48d6556
)
smacker: Don't return packets in unallocated streams
author
Martin Storsjö
<martin@martin.st>
Wed, 11 Sep 2013 12:20:01 +0000
(15:20 +0300)
committer
Martin Storsjö
<martin@martin.st>
Wed, 11 Sep 2013 17:19:12 +0000
(20:19 +0300)
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/smacker.c
patch
|
blob
|
history
diff --git
a/libavformat/smacker.c
b/libavformat/smacker.c
index
cd4353a
..
a15bded
100644
(file)
--- a/
libavformat/smacker.c
+++ b/
libavformat/smacker.c
@@
-344,6
+344,8
@@
static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
smk->cur_frame++;
smk->nextpos = avio_tell(s->pb);
} else {
+ if (smk->stream_id[smk->curstream] < 0)
+ return AVERROR_INVALIDDATA;
if (av_new_packet(pkt, smk->buf_sizes[smk->curstream]))
return AVERROR(ENOMEM);
memcpy(pkt->data, smk->bufs[smk->curstream], smk->buf_sizes[smk->curstream]);