Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#523 closed defect (fixed)

Assertion "channel_count == channel_count(channel_layout)" fails

Reported by: Carl Eugen Hoyos Owned by: Michael Niedermayer
Priority: important Component: swresample
Version: git-master Keywords: crash abort
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Some AAC samples are detected as "2 channels (FC)", leading to an assert when converting to ac3.

$ ffmpeg -i out.loas out.ac3
ffmpeg version N-33192-gfe70c1f, Copyright (c) 2000-2011 the FFmpeg developers
  built on Oct  1 2011 12:36:37 with gcc 4.3.2 [gcc-4_3-branch revision 141291]
  configuration: --enable-libopenjpeg
  libavutil    51. 18. 0 / 51. 18. 0
  libavcodec   53. 19. 0 / 53. 19. 0
  libavformat  53. 13. 0 / 53. 13. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 43. 6 /  2. 43. 6
  libswscale    2.  1. 0 /  2.  1. 0
[loas @ 0x8d3faa0] max_analyze_duration 5000000 reached at 5034667
[loas @ 0x8d3faa0] Estimating duration from bitrate, this may be inaccurate
Input #0, loas, from 'out.loas':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Audio: aac_latm, 48000 Hz, 2 channels (FC), s16
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
[ac3 @ 0x8d46940] channel_layout not specified
[ac3 @ 0x8d46940] No channel layout specified. The encoder will guess the layout, but it might be incorrect.
Output #0, ac3, to 'out.ac3':
  Metadata:
    encoder         : Lavf53.13.0
    Stream #0:0: Audio: ac3, 48000 Hz, stereo, flt, 128 kb/s
Stream mapping:
  Stream #0.0 -> #0.0 (aac_latm -> ac3)
Press [q] to stop, [?] for help
0.707107
0.707107
Assertion in ->ch_count == av_get_channel_layout_nb_channels(s-> in_ch_layout) failed at libswresample/rematrix.c:231
Aborted

Attachments (1)

out.loas (110.8 KB ) - added by Carl Eugen Hoyos 13 years ago.

Download all attachments as: .zip

Change History (5)

by Carl Eugen Hoyos, 13 years ago

Attachment: out.loas added

comment:1 by Michael Niedermayer, 13 years ago

Reproduced by developer: set
Resolution: fixed
Status: newclosed

comment:2 by Carl Eugen Hoyos, 13 years ago

Resolution: fixed
Status: closedreopened
$ ffmpeg -i out.loas out.ac3
ffmpeg version N-34849-g07c7ffc, Copyright (c) 2000-2011 the FFmpeg developers
  built on Nov 14 2011 10:26:26 with gcc 4.5.3
  configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc
  libavutil    51. 24. 1 / 51. 24. 1
  libavcodec   53. 33. 0 / 53. 33. 0
  libavformat  53. 20. 0 / 53. 20. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 48. 1 /  2. 48. 1
  libswscale    2.  1. 0 /  2.  1. 0
[loas @ 0x138d760] max_analyze_duration 5000000 reached at 5034667
[loas @ 0x138d760] Estimating duration from bitrate, this may be inaccurate
Input #0, loas, from 'out.loas':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Audio: aac_latm, 48000 Hz, 2 channels (FC), s16
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
[ac3 @ 0x13a3a00] channel_layout not specified
[ac3 @ 0x13a3a00] No channel layout specified. The encoder will guess the layout, but it might be incorrect.
Output #0, ac3, to 'out.ac3':
  Metadata:
    encoder         : Lavf53.20.0
    Stream #0:0: Audio: ac3, 48000 Hz, stereo, flt, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (aac_latm -> ac3)
Press [q] to stop, [?] for help
Assertion ctx->channels == out->ch_count failed at libswresample/audioconvert.c:66
Aborted

comment:3 by Clément Bœsch, 13 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in c8136ebd, thanks.

comment:4 by Carl Eugen Hoyos, 12 years ago

Keywords: crash abort added
Note: See TracTickets for help on using tickets.