Skip to content

Commit

Permalink
ffmpeg: add missing check for NULL pointer
Browse files Browse the repository at this point in the history
Extends commit 8ec66e2
(fixed: playing mpegts over rtsp caused ffmpeg to read uninitialized stack values)
  • Loading branch information
margro authored and opdenkamp committed Mar 13, 2011
1 parent afd2d97 commit 54fd0c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ffmpeg/libavformat/utils.c
Expand Up @@ -1092,7 +1092,7 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
av_add_index_entry(st, pkt->pos, pkt->dts, 0, 0, AVINDEX_KEYFRAME);
}
break;
} else if (st->cur_len > 0 && st->discard < AVDISCARD_ALL) {
} else if (st->cur_len > 0 && st->cur_ptr && st->discard < AVDISCARD_ALL) {
len = av_parser_parse2(st->parser, st->codec, &pkt->data, &pkt->size,
st->cur_ptr, st->cur_len,
st->cur_pkt.pts, st->cur_pkt.dts,
Expand Down

0 comments on commit 54fd0c0

Please sign in to comment.