This filter is not required anymore with aformat. Drop it at next bump.
Unified · Split
| @@ -37,7 +37,7 @@ · 36 unmodified lines | |||
| 37 | #include <libavfilter/buffersink.h> | 37 | #include <libavfilter/buffersink.h> |
| 38 | #include <libavfilter/buffersrc.h> | 38 | #include <libavfilter/buffersrc.h> |
| 39 | 39 | ||
| 40 | const char *filter_descr = "aresample=8000,aconvert=s16:mono"; | 40 | const char *filter_descr = "aresample=8000,aformat=sample_fmts=s16:channel_layouts=mono"; |
| 41 | const char *player = "ffplay -f s16le -ar 8000 -ac 1 -"; | 41 | const char *player = "ffplay -f s16le -ar 8000 -ac 1 -"; |
| 42 | 42 | ||
| 43 | static AVFormatContext *fmt_ctx; | 43 | static AVFormatContext *fmt_ctx; |
| @@ -393,17 +393,17 @@ Appending @code{:v} to it will do exactly that. · 392 unmodified lines | |||
| 393 | Use @option{-dumpgraph -} to find out exactly where the channel layout is | 393 | Use @option{-dumpgraph -} to find out exactly where the channel layout is |
| 394 | lost. | 394 | lost. |
| 395 | 395 | ||
| 396 | Most likely, it is through @code{auto-inserted aconvert}. Try to understand | 396 | Most likely, it is through @code{auto-inserted aresample}. Try to understand |
| 397 | why the converting filter was needed at that place. | 397 | why the converting filter was needed at that place. |
| 398 | 398 | ||
| 399 | Just before the output is a likely place, as @option{-f lavfi} currently | 399 | Just before the output is a likely place, as @option{-f lavfi} currently |
| 400 | only support packed S16. | 400 | only support packed S16. |
| 401 | 401 | ||
| 402 | Then insert the correct @code{aconvert} explicitly in the filtergraph, | 402 | Then insert the correct @code{aformat} explicitly in the filtergraph, |
| 403 | specifying the exact format. | 403 | specifying the exact format. |
| 404 | 404 | ||
| 405 | @example | 405 | @example |
| 406 | aconvert=s16:stereo:packed | 406 | aformat=sample_fmts=s16:channel_layouts=stereo |
| 407 | @end example | 407 | @end example |
| 408 | 408 | ||
| 409 | @section Why does FFmpeg not see the subtitles in my VOB file? | 409 | @section Why does FFmpeg not see the subtitles in my VOB file? |
| @@ -283,6 +283,8 @@ Below is a description of the currently available audio filters. · 282 unmodified lines | |||
| 283 | 283 | ||
| 284 | Convert the input audio format to the specified formats. | 284 | Convert the input audio format to the specified formats. |
| 285 | 285 | ||
| 286 | @emph{This filter is deprecated. Use @ref{aformat} instead.} | ||
| 287 | |||
| 286 | The filter accepts a string of the form: | 288 | The filter accepts a string of the form: |
| 287 | "@var{sample_format}:@var{channel_layout}". | 289 | "@var{sample_format}:@var{channel_layout}". |
| 288 | 290 | ||
| @@ -45,6 +45,8 @@ static av_cold int init(AVFilterContext *ctx, const char *args0) · 44 unmodified lines | |||
| 45 | int ret = 0; | 45 | int ret = 0; |
| 46 | char *args = av_strdup(args0); | 46 | char *args = av_strdup(args0); |
| 47 | 47 | ||
| 48 | av_log(ctx, AV_LOG_WARNING, "This filter is deprecated, use aformat instead\n"); | ||
| 49 | |||
| 48 | aconvert->out_sample_fmt = AV_SAMPLE_FMT_NONE; | 50 | aconvert->out_sample_fmt = AV_SAMPLE_FMT_NONE; |
| 49 | aconvert->out_chlayout = 0; | 51 | aconvert->out_chlayout = 0; |
| 50 | 52 | ||
| @@ -45,7 +45,9 @@ void avfilter_register_all(void) · 44 unmodified lines | |||
| 45 | return; | 45 | return; |
| 46 | initialized = 1; | 46 | initialized = 1; |
| 47 | 47 | ||
| 48 | #if FF_API_ACONVERT_FILTER | ||
| 48 | REGISTER_FILTER(ACONVERT, aconvert, af); | 49 | REGISTER_FILTER(ACONVERT, aconvert, af); |
| 50 | #endif | ||
| 49 | REGISTER_FILTER(AFADE, afade, af); | 51 | REGISTER_FILTER(AFADE, afade, af); |
| 50 | REGISTER_FILTER(AFORMAT, aformat, af); | 52 | REGISTER_FILTER(AFORMAT, aformat, af); |
| 51 | REGISTER_FILTER(ALLPASS, allpass, af); | 53 | REGISTER_FILTER(ALLPASS, allpass, af); |
| @@ -675,7 +675,9 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, · 674 unmodified lines | |||
| 675 | // TODO: drop me | 675 | // TODO: drop me |
| 676 | static const char *const filters_left_to_update[] = { | 676 | static const char *const filters_left_to_update[] = { |
| 677 | "abuffer", | 677 | "abuffer", |
| 678 | #if FF_API_ACONVERT_FILTER | ||
| 678 | "aconvert", | 679 | "aconvert", |
| 680 | #endif | ||
| 679 | "atempo", | 681 | "atempo", |
| 680 | "buffer", | 682 | "buffer", |
| 681 | "mp", | 683 | "mp", |
| @@ -98,7 +98,7 @@ int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt, · 97 unmodified lines | |||
| 98 | * Enable or disable automatic format conversion inside the graph. | 98 | * Enable or disable automatic format conversion inside the graph. |
| 99 | * | 99 | * |
| 100 | * Note that format conversion can still happen inside explicitly inserted | 100 | * Note that format conversion can still happen inside explicitly inserted |
| 101 | * scale and aconvert filters. | 101 | * scale and aresample filters. |
| 102 | * | 102 | * |
| 103 | * @param flags any of the AVFILTER_AUTO_CONVERT_* constants | 103 | * @param flags any of the AVFILTER_AUTO_CONVERT_* constants |
| 104 | */ | 104 | */ |
| @@ -66,5 +66,8 @@ · 65 unmodified lines | |||
| 66 | #ifndef FF_API_OLD_FILTER_OPTS | 66 | #ifndef FF_API_OLD_FILTER_OPTS |
| 67 | #define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 4) | 67 | #define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 4) |
| 68 | #endif | 68 | #endif |
| 69 | #ifndef FF_API_ACONVERT_FILTER | ||
| 70 | #define FF_API_ACONVERT_FILTER (LIBAVFILTER_VERSION_MAJOR < 4) | ||
| 71 | #endif | ||
| 69 | 72 | ||
| 70 | #endif /* AVFILTER_VERSION_H */ | 73 | #endif /* AVFILTER_VERSION_H */ |