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
662int ff_parse_channel_layout(int64_t *ret, int *nret, const char *arg,662int ff_parse_channel_layout(int64_t *ret, int *nret, const char *arg,
663 void *log_ctx)663 void *log_ctx)
664{664{
665 char *tail;
666 int64_t chlayout;665 int64_t chlayout;
667 int nb_channels;666 int nb_channels;
668 667
669 if (av_get_extended_channel_layout(arg, &chlayout, &nb_channels) < 0) {668 if (av_get_extended_channel_layout(arg, &chlayout, &nb_channels) < 0) {
670 /* [TEMPORARY 2016-12 -> 2017-12]*/669 av_log(log_ctx, AV_LOG_ERROR, "Invalid channel layout '%s'\n", arg);
671 nb_channels = strtol(arg, &tail, 10);670 return AVERROR(EINVAL);
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 }
679 }671 }
680 if (!chlayout && !nret) {672 if (!chlayout && !nret) {
681 av_log(log_ctx, AV_LOG_ERROR, "Unknown channel layout '%s' is not supported.\n", arg);673 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
750 = ff_parse_channel_layout(0000000000000004, 1, 1c);750 = ff_parse_channel_layout(0000000000000004, 1, 1c);
760 = ff_parse_channel_layout(0000000000000003, 2, 2c);760 = ff_parse_channel_layout(0000000000000003, 2, 2c);
77-1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, -1c);77-1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, -1c);
780 = ff_parse_channel_layout(0000000000000000, 60, 60c);78-1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, 60c);
79-1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, 65c);79-1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, 65c);
800 = ff_parse_channel_layout(0000000000000000, 2, 2C);800 = ff_parse_channel_layout(0000000000000000, 2, 2C);
810 = ff_parse_channel_layout(0000000000000000, 60, 60C);810 = 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