mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
mm: Skip unexpected audio packets
Bug-Id: 1046 CC: libav-stable@libav.org
This commit is contained in:
parent
f2c469b73f
commit
1731c3530b
@ -174,6 +174,12 @@ static int read_packet(AVFormatContext *s,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case MM_TYPE_AUDIO :
|
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)
|
if (av_get_packet(s->pb, pkt, length)<0)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
pkt->size = length;
|
pkt->size = length;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user