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