Browse code

use av_strdup

Originally committed as revision 8567 to svn://svn.ffmpeg.org/ffmpeg/trunk

Alex Beregszaszi authored on 2007/03/31 23:36:24
Showing 1 changed files
... ...
@@ -4320,11 +4320,7 @@ static int parse_ffconfig(const char *filename)
4320 4320
             get_arg(arg, sizeof(arg), &p);
4321 4321
             if (stream) {
4322 4322
                 av_freep(&stream->rtsp_option);
4323
-                /* XXX: av_strdup ? */
4324
-                stream->rtsp_option = av_malloc(strlen(arg) + 1);
4325
-                if (stream->rtsp_option) {
4326
-                    strcpy(stream->rtsp_option, arg);
4327
-                }
4323
+                stream->rtsp_option = av_strdup(arg);
4328 4324
             }
4329 4325
         } else if (!strcasecmp(cmd, "MulticastAddress")) {
4330 4326
             get_arg(arg, sizeof(arg), &p);