mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/smacker: Don't return packets for streams with AVDISCARD_ALL
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
0df4e1ff93
commit
dfd12ee053
@ -308,8 +308,11 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
smk->frame_size -= size;
|
||||
size -= 4;
|
||||
|
||||
if (smk->indexes[i] < 0) {
|
||||
avio_skip(s->pb, size);
|
||||
if (smk->indexes[i] < 0 ||
|
||||
s->streams[smk->indexes[i]]->discard >= AVDISCARD_ALL) {
|
||||
smk->aud_pts[i] += smk->duration_size[i] ? avio_rl32(s->pb)
|
||||
: size;
|
||||
avio_skip(s->pb, size - smk->duration_size[i]);
|
||||
continue;
|
||||
}
|
||||
if ((ret = av_get_packet(s->pb, pkt, size)) != size) {
|
||||
@ -326,6 +329,10 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
}
|
||||
}
|
||||
|
||||
if (s->streams[smk->videoindex]->discard >= AVDISCARD_ALL) {
|
||||
ret = FFERROR_REDO;
|
||||
goto next_frame;
|
||||
}
|
||||
if (smk->frame_size >= INT_MAX/2) {
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto next_frame;
|
||||
|
Loading…
Reference in New Issue
Block a user