Commit a39536ca authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avformat/mpeg: Don't use unintialized value

vobsub_read_packet() didn't check whether an array of AVPackets was
valid and therefore used uninitialized values.
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
parent 46d2b207
......@@ -927,6 +927,10 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt)
FFDemuxSubtitlesQueue *tmpq = &vobsub->q[i];
int64_t ts;
av_assert0(tmpq->nb_subs);
if (tmpq->current_sub_idx >= tmpq->nb_subs)
continue;
ts = tmpq->subs[tmpq->current_sub_idx].pts;
if (ts < min_ts) {
min_ts = ts;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment