1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-12 04:15:06 +02:00

Revert "ffserver: use AVStream.codecpar in open_input_stream()"

Fixes null pointer dereference

Testcase is simply a ffmpeg instance sending a stream to ffserver while another ffmpeg reads from it

This reverts commit 6f0a1710d7.
This commit is contained in:
Michael Niedermayer 2016-11-23 19:26:38 +01:00
parent 6a4e24280d
commit bc9eb0467a

View File

@ -2213,7 +2213,7 @@ static int open_input_stream(HTTPContext *c, const char *info)
c->pts_stream_index = 0;
for(i=0;i<c->stream->nb_streams;i++) {
if (c->pts_stream_index == 0 &&
c->stream->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
c->stream->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
c->pts_stream_index = i;
}
}