Browse Source

mm: Skip unexpected audio packets

Bug-Id: 1046
CC: libav-stable@libav.org
tags/n4.0
Luca Barbato 8 years ago
parent
commit
1731c3530b
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      libavformat/mm.c

+ 6
- 0
libavformat/mm.c View File

@@ -174,6 +174,12 @@ static int read_packet(AVFormatContext *s,
return 0;

case MM_TYPE_AUDIO :
if (s->nb_streams != 2) {
av_log(s, AV_LOG_ERROR,
"Unexpected audio packet, skipping\n");
avio_skip(pb, length);
return AVERROR_INVALIDDATA;
}
if (av_get_packet(s->pb, pkt, length)<0)
return AVERROR(ENOMEM);
pkt->size = length;


Loading…
Cancel
Save