diff rtsp.c @ 5644:95e016b6158c libavformat

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.
author rbultje
date Wed, 10 Feb 2010 18:30:55 +0000
parents dca2836e09b8
children ebf397240c91
line wrap: on
line diff
--- a/rtsp.c	Wed Feb 10 17:20:50 2010 +0000
+++ b/rtsp.c	Wed Feb 10 18:30:55 2010 +0000
@@ -131,9 +131,8 @@
     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 @@
             break;
         }
         return 0;
-    }
-
-    return -1;
 }
 
 /* return the length and optionally the data */