|
|
@ -330,24 +330,22 @@ static int asink_query_formats(AVFilterContext *ctx) |
|
|
|
"Conflicting ch_layouts and list of channel_counts/channel_layouts. Ignoring the former\n"); |
|
|
|
"Conflicting ch_layouts and list of channel_counts/channel_layouts. Ignoring the former\n"); |
|
|
|
else |
|
|
|
else |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
while (cur && *cur) { |
|
|
|
while (cur) { |
|
|
|
char *chl = av_get_token(&cur, "|,"); |
|
|
|
char *next = strchr(cur, '|'); |
|
|
|
if (!chl) |
|
|
|
if (next) |
|
|
|
return AVERROR(ENOMEM); |
|
|
|
*next++ = 0; |
|
|
|
if (*cur) |
|
|
|
|
|
|
|
cur++; |
|
|
|
ret = av_channel_layout_from_string(&layout, cur); |
|
|
|
|
|
|
|
|
|
|
|
ret = av_channel_layout_from_string(&layout, chl); |
|
|
|
|
|
|
|
if (ret < 0) { |
|
|
|
if (ret < 0) { |
|
|
|
av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout: %s.\n", chl); |
|
|
|
av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout: %s.\n", cur); |
|
|
|
av_free(chl); |
|
|
|
|
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|
ret = ff_add_channel_layout(&layouts, &layout); |
|
|
|
ret = ff_add_channel_layout(&layouts, &layout); |
|
|
|
av_channel_layout_uninit(&layout); |
|
|
|
av_channel_layout_uninit(&layout); |
|
|
|
av_free(chl); |
|
|
|
|
|
|
|
if (ret < 0) |
|
|
|
if (ret < 0) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cur = next; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|