[FFmpeg-devel] [PATCH v2] libavfilter/formats: Fix parsing of channel specifications with a trailing 'c'.
ffmpeg-dev at c-14.de
Sat Jun 20 18:48:25 CEST 2015
On 15-06-20 at 14:31, Michael Niedermayer wrote:
> On Wed, Jun 10, 2015 at 07:55:52PM +0200, Simon Thelen wrote:
> > Signed-off-by: Simon Thelen <ffmpeg-dev at c-14.de>
> > ---
> > libavfilter/formats.c | 14 +++-----------
> > 1 file changed, 3 insertions(+), 11 deletions(-)
> breaks fate
At least some if not all of those fate tests seem wrong to me.
Below I copy pasted the tests that fail with my patch below the
corresponding tests without the 'c' appended. To the best of my
knowledge, since the CHANNEL_LAYOUT_COMPAT layer hasn't been removed
channel layouts with the 'c' and channel layouts without the 'c' should
behave the same. This is not reflected in the current fate tests.
>0 = ff_parse_channel_layout(0000000000000004, 1, 1);
>0 = ff_parse_channel_layout(0000000000000003, 2, 2);
>0 = ff_parse_channel_layout(0000000000000000, 1, 1c);
>0 = ff_parse_channel_layout(0000000000000000, 2, 2c);
The bottom 2 should be modified so they match the top 2.
>0 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, 64, -1);
>-1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, -1c);
>0 = ff_parse_channel_layout(000000000000003C, 4, 60);
>0 = ff_parse_channel_layout(0000000000000041, 2, 65);
>0 = ff_parse_channel_layout(0000000000000000, 60, 60c);
>-1 = ff_parse_channel_layout(FFFFFFFFFFFFFFFF, -1, 65c);
I think the results for the tests with the 'c' should be correct for
these 2 blocks (At very least the test for -1c should be correct and the
test for -1 should be modified so the output matches).
I'll send a v3 of this patch that fails when chlayout is < 0 or > 63
along with a patch that updates the fate refs for the incorrect tests.
The patch for the refs assumes FF_API_GET_CHANNEL_LAYOUT_COMPAT is set,
if that defaults to unset/is removed the fate refs will need to be
updated (for all tests without the 'c' appended).
More information about the ffmpeg-devel