History

avfilter/formats: remove support for deprecated channel count specification

Marton Balint committed 8 years ago

Commit e3acba01 parent 7652af92 files · +3 −11Browse files

Unified · Split

2 files
  1. libavfilter/formats.c +2 −10
  2. tests/ref/fate/filter-formats +1 −1
libavfilter/formats.c+2−10
@@ -662,20 +662,12 @@ int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx) · 661 unmodified lines
662662 int ff_parse_channel_layout(int64_t *ret, int *nret, const char *arg,
663663 void *log_ctx)
664664 {
665− char *tail;
666665 int64_t chlayout;
667666 int nb_channels;
668667
669668 if (av_get_extended_channel_layout(arg, &chlayout, &nb_channels) < 0) {
670− /* [TEMPORARY 2016-12 -> 2017-12]*/
671− nb_channels = strtol(arg, &tail, 10);
672− if (!errno && *tail == 'c' && *(tail + 1) == '\0' && nb_channels > 0 && nb_channels < 64) {
673− chlayout = 0;
674− av_log(log_ctx, AV_LOG_WARNING, "Deprecated channel count specification '%s'. This will stop working in releases made in 2018 and after.\n", arg);
675− } else {
676− av_log(log_ctx, AV_LOG_ERROR, "Invalid channel layout '%s'\n", arg);
677− return AVERROR(EINVAL);
678− }
669+ av_log(log_ctx, AV_LOG_ERROR, "Invalid channel layout '%s'\n", arg);
670+ return AVERROR(EINVAL);
679671 }
680672 if (!chlayout && !nret) {
681673 av_log(log_ctx, AV_LOG_ERROR, "Unknown channel layout '%s' is not supported.\n", arg);
tests/ref/fate/filter-formats+1−1
@@ -75,7 +75,7 @@ quad(side) · 74 unmodified lines
7575 0 = ff_parse_channel_layout(0000000000000004, 1, 1c);
7676 0 = ff_parse_channel_layout(0000000000000003, 2, 2c);
7777 -1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, -1c);
78−0 = ff_parse_channel_layout(0000000000000000, 60, 60c);
78+-1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, 60c);
7979 -1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, 65c);
8080 0 = ff_parse_channel_layout(0000000000000000, 2, 2C);
8181 0 = ff_parse_channel_layout(0000000000000000, 60, 60C);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t