From 456001486ee8fe1cd906e497b603f98159191175 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Fri, 6 Apr 2012 23:07:12 +0300 Subject: rtsp: Don't expose the MS-RTSP RTX data stream to the caller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids exposing a dummy AVStream which won't get any data and which will make avformat_find_stream_info wait for info about this stream. Signed-off-by: Martin Storsjö --- libavformat/rtpdec_h264.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libavformat/rtpdec_h264.c') diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c index 9da79fcbf5..32a57d3ec7 100644 --- a/libavformat/rtpdec_h264.c +++ b/libavformat/rtpdec_h264.c @@ -357,10 +357,15 @@ static void h264_free_context(PayloadContext *data) static int parse_h264_sdp_line(AVFormatContext *s, int st_index, PayloadContext *h264_data, const char *line) { - AVStream *stream = s->streams[st_index]; - AVCodecContext *codec = stream->codec; + AVStream *stream; + AVCodecContext *codec; const char *p = line; + if (st_index < 0) + return 0; + + stream = s->streams[st_index]; + codec = stream->codec; assert(h264_data->cookie == MAGIC_COOKIE); if (av_strstart(p, "framesize:", &p)) { -- cgit v1.2.3