Mercurial > libavformat.hg
comparison utils.c @ 5488:033545e4dfd0 libavformat
Use av_guess_format() in place of the deprecated guess_format().
author | stefano |
---|---|
date | Fri, 01 Jan 2010 12:58:03 +0000 |
parents | 0794c77c3c46 |
children | 611a8e6209be |
comparison
equal
deleted
inserted
replaced
5487:06b9ae377c25 | 5488:033545e4dfd0 |
---|---|
199 /* specific test for image sequences */ | 199 /* specific test for image sequences */ |
200 #if CONFIG_IMAGE2_MUXER | 200 #if CONFIG_IMAGE2_MUXER |
201 if (!short_name && filename && | 201 if (!short_name && filename && |
202 av_filename_number_test(filename) && | 202 av_filename_number_test(filename) && |
203 av_guess_image2_codec(filename) != CODEC_ID_NONE) { | 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 #endif | 206 #endif |
207 /* Find the proper file type. */ | 207 /* Find the proper file type. */ |
208 fmt_found = NULL; | 208 fmt_found = NULL; |
209 score_max = 0; | 209 score_max = 0; |
229 | 229 |
230 #if LIBAVFORMAT_VERSION_MAJOR < 53 | 230 #if LIBAVFORMAT_VERSION_MAJOR < 53 |
231 AVOutputFormat *guess_stream_format(const char *short_name, const char *filename, | 231 AVOutputFormat *guess_stream_format(const char *short_name, const char *filename, |
232 const char *mime_type) | 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 if (fmt) { | 236 if (fmt) { |
237 AVOutputFormat *stream_fmt; | 237 AVOutputFormat *stream_fmt; |
238 char stream_format_name[64]; | 238 char stream_format_name[64]; |
239 | 239 |
240 snprintf(stream_format_name, sizeof(stream_format_name), "%s_stream", fmt->name); | 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 if (stream_fmt) | 243 if (stream_fmt) |
244 fmt = stream_fmt; | 244 fmt = stream_fmt; |
245 } | 245 } |
246 | 246 |