Merge commit '8d928023f953a28692ba27071a448259134b103b'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 12 Sep 2013 09:26:11 +0000 (11:26 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 12 Sep 2013 09:26:17 +0000 (11:26 +0200)
* commit '8d928023f953a28692ba27071a448259134b103b':
  smacker: Don't return packets in unallocated streams

Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/smacker.c

index b0ccd53..b219153 100644 (file)
@@ -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]);