[SCM] libav/experimental: 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.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:59:44 UTC 2013


The following commit has been merged in the experimental branch:
commit 170870b77c8c71304f9eae946d49aa5e30a464bc
Author: Ronald S. Bultje <rsbultje at gmail.com>
Date:   Wed Feb 10 18:30:55 2010 +0000

    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

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 */

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list