mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avformat/mxfdec: only return stream indexes which have a corresponding track
Without this check some crafted files might crash because a packet might be demuxed which have no corresponding mxf track. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
3e0f3be2b0
commit
e5ff2c0c06
@ -423,7 +423,7 @@ static int mxf_get_stream_index(AVFormatContext *s, KLVPacket *klv, int body_sid
|
||||
return i;
|
||||
}
|
||||
/* return 0 if only one stream, for OP Atom files with 0 as track number */
|
||||
return s->nb_streams == 1 ? 0 : -1;
|
||||
return s->nb_streams == 1 && s->streams[0]->priv_data ? 0 : -1;
|
||||
}
|
||||
|
||||
static int find_body_sid_by_offset(MXFContext *mxf, int64_t offset)
|
||||
|
Loading…
Reference in New Issue
Block a user