mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
Merge commit '8d928023f9'
* commit '8d928023f9':
smacker: Don't return packets in unallocated streams
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
33cf70a8b8
1 changed files with 2 additions and 0 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue