aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-12 11:26:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-12 11:26:17 +0200
commit33cf70a8b88cebdeee745b3a9c7b4f164d7497f8 (patch)
tree2b360bb22192477f2cdecfaece47f04eebf38802
parent7e88dbe9358fd108dd565c994b6020b95d50c57a (diff)
parent8d928023f953a28692ba27071a448259134b103b (diff)
downloadffmpeg-33cf70a8b88cebdeee745b3a9c7b4f164d7497f8.tar.gz
Merge commit '8d928023f953a28692ba27071a448259134b103b'
* commit '8d928023f953a28692ba27071a448259134b103b': smacker: Don't return packets in unallocated streams Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/smacker.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index b0ccd5387a..b219153513 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -348,6 +348,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]);