From 170870b77c8c71304f9eae946d49aa5e30a464bc Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 10 Feb 2010 18:30:55 +0000 Subject: [PATCH] Don't forget to set known audio parameters (samplerate, etc.) if the codec is not supported in FFmpeg. This will cause crashes later because the samplerate is used to initialize the timebase. Originally committed as revision 21741 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rtsp.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index d1738dd..171d707 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -131,9 +131,8 @@ static int sdp_parse_rtpmap(AVFormatContext *s, if (c && c->name) c_name = c->name; else - c_name = (char *) NULL; + c_name = "(null)"; - if (c_name) { get_word_sep(buf, sizeof(buf), "/", &p); i = atoi(buf); switch (codec->codec_type) { @@ -164,9 +163,6 @@ static int sdp_parse_rtpmap(AVFormatContext *s, break; } return 0; - } - - return -1; } /* return the length and optionally the data */ -- 2.7.4