Browse code

Use av_guess_format() in place of the deprecated guess_format().

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

Stefano Sabatini authored on 2010/01/01 21:58:03
Showing 3 changed files
... ...
@@ -3361,14 +3361,14 @@ static void opt_output_file(const char *filename)
3361 3361
     }
3362 3362
 
3363 3363
     if (last_asked_format) {
3364
-        file_oformat = guess_format(last_asked_format, NULL, NULL);
3364
+        file_oformat = av_guess_format(last_asked_format, NULL, NULL);
3365 3365
         if (!file_oformat) {
3366 3366
             fprintf(stderr, "Requested output format '%s' is not a suitable output format\n", last_asked_format);
3367 3367
             av_exit(1);
3368 3368
         }
3369 3369
         last_asked_format = NULL;
3370 3370
     } else {
3371
-        file_oformat = guess_format(NULL, filename, NULL);
3371
+        file_oformat = av_guess_format(NULL, filename, NULL);
3372 3372
         if (!file_oformat) {
3373 3373
             fprintf(stderr, "Unable to find a suitable output format for '%s'\n",
3374 3374
                     filename);
... ...
@@ -3170,7 +3170,7 @@ static int rtp_new_av_stream(HTTPContext *c,
3170 3170
     ctx = avformat_alloc_context();
3171 3171
     if (!ctx)
3172 3172
         return -1;
3173
-    ctx->oformat = guess_format("rtp", NULL, NULL);
3173
+    ctx->oformat = av_guess_format("rtp", NULL, NULL);
3174 3174
 
3175 3175
     st = av_mallocz(sizeof(AVStream));
3176 3176
     if (!st)
... ...
@@ -3734,14 +3734,14 @@ static int ffserver_opt_default(const char *opt, const char *arg,
3734 3734
 static AVOutputFormat *ffserver_guess_format(const char *short_name, const char *filename,
3735 3735
                                              const char *mime_type)
3736 3736
 {
3737
-    AVOutputFormat *fmt = guess_format(short_name, filename, mime_type);
3737
+    AVOutputFormat *fmt = av_guess_format(short_name, filename, mime_type);
3738 3738
 
3739 3739
     if (fmt) {
3740 3740
         AVOutputFormat *stream_fmt;
3741 3741
         char stream_format_name[64];
3742 3742
 
3743 3743
         snprintf(stream_format_name, sizeof(stream_format_name), "%s_stream", fmt->name);
3744
-        stream_fmt = guess_format(stream_format_name, NULL, NULL);
3744
+        stream_fmt = av_guess_format(stream_format_name, NULL, NULL);
3745 3745
 
3746 3746
         if (stream_fmt)
3747 3747
             fmt = stream_fmt;
... ...
@@ -3880,7 +3880,7 @@ static int parse_ffconfig(const char *filename)
3880 3880
                     }
3881 3881
                 }
3882 3882
 
3883
-                feed->fmt = guess_format("ffm", NULL, NULL);
3883
+                feed->fmt = av_guess_format("ffm", NULL, NULL);
3884 3884
                 /* defaut feed file */
3885 3885
                 snprintf(feed->feed_filename, sizeof(feed->feed_filename),
3886 3886
                          "/tmp/%s.ffm", feed->filename);
... ...
@@ -201,7 +201,7 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
201 201
     if (!short_name && filename &&
202 202
         av_filename_number_test(filename) &&
203 203
         av_guess_image2_codec(filename) != CODEC_ID_NONE) {
204
-        return guess_format("image2", NULL, NULL);
204
+        return av_guess_format("image2", NULL, NULL);
205 205
     }
206 206
 #endif
207 207
     /* Find the proper file type. */
... ...
@@ -231,14 +231,14 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
231 231
 AVOutputFormat *guess_stream_format(const char *short_name, const char *filename,
232 232
                              const char *mime_type)
233 233
 {
234
-    AVOutputFormat *fmt = guess_format(short_name, filename, mime_type);
234
+    AVOutputFormat *fmt = av_guess_format(short_name, filename, mime_type);
235 235
 
236 236
     if (fmt) {
237 237
         AVOutputFormat *stream_fmt;
238 238
         char stream_format_name[64];
239 239
 
240 240
         snprintf(stream_format_name, sizeof(stream_format_name), "%s_stream", fmt->name);
241
-        stream_fmt = guess_format(stream_format_name, NULL, NULL);
241
+        stream_fmt = av_guess_format(stream_format_name, NULL, NULL);
242 242
 
243 243
         if (stream_fmt)
244 244
             fmt = stream_fmt;