Opened 12 years ago

Closed 12 years ago

#1458 closed defect (fixed)

aresample crashes on channel count change

Reported by: ramitb Owned by:
Priority: important Component: swresample
Version: git-master Keywords: aconvert
Cc: ami_stuff@o2.pl Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug: FFMPEG Crashes when converting AC3 to AAC with DRC enabled. This is with the newer builds.

The last working build is N-40640-g5edd4fc, no issues.

The source file is too big to attached (this happens at about the 43 second mark).

http://www.mediafire.com/?k2t3z4f5udkla8a

How to reproduce:
COMMAND:

ffmpeg -async 1 -threads 0 -drc_scale 0.8 -y -i "RemuxSup Fail H264.ts" -ss 3 -vf y
adif=0:-1,hqdn3d,crop=1920:1072:0:4,scale=720:400 -vcodec libx264 -b 2000000 -flags +loop -cmp +chroma -deblock -1:-1 -b
t 256k -refs 8 -bf 3 -b_strategy 2 -coder 1 -me_method hex -me_range 16 -subq 8 -partitions +parti4x4+parti8x8+partp8x8+
partb8x8 -weightb 1 -mixed-refs 1 -8x8dct 1 -g 25 -keyint_min 20 -level 41 -trellis 1 -sc_threshold 40 -i_qfactor 0.71 -
acodec libvo_aacenc -ab 192k -vol 1143 -ac 2 "RemuxSup Fail H264.mp4"

OUTPUT:

ffmpeg version N-41578-ga5c1a0c Copyright (c) 2000-2012 the FFmpeg developers
  built on Jun 13 2012 22:34:53 with gcc 4.6.3
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enab
le-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable
-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschro
edinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
libvorbis --enable-libvpx --ena  libavutil      51. 58.100 / 51. 58.100
  libavcodec     54. 25.100 / 54. 25.100
  libavformat    54.  6.101 / 54.  6.101
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 79.100 /  2. 79.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mpegts, from 'RemuxSup Fail H264.ts':
  Duration: 00:01:37.00, start: 1.400000, bitrate: 17209 kb/s
  Program 1
    Metadata:
      service_name    : Canal+ Comedia HD
      service_provider: Canal+ Comedia HD
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 104857
kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](dos): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, s16, 192 kb/s
Please use -b:a or -b:v, -b is ambiguous
[Parsed_yadif_0 @ 031b80e0] mode:0 parity:-1 auto_enable:0
[Parsed_hqdn3d_1 @ 031b8200] ls:4.000000 cs:3.000000 lt:6.000000 ct:4.500000
[buffer @ 02d5f8a0] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:1/1 sws_param:flags=2
[ffmpeg_buffersink @ 02d5fa20] No opaque field provided
[Parsed_crop_2 @ 02ca39e0] w:1920 h:1080 sar:1/1 -> w:1920 h:1072 sar:1/1
[Parsed_scale_3 @ 02ca0940] w:1920 h:1072 fmt:yuv420p sar:1/1 -> w:720 h:400 fmt:yuv420p sar:200/201 flags:0x4
-async is forwarded to lavfi similarly to -af aresample=min_comp=0.001:min_hard_comp=0.100000.
-vol is forwarded to lavfi similarly to -af volume=4.464844.
[volume @ 02c85f60] volume=4.464844
[aresample @ 02c85e40] chl:stereo fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:48000Hz
[libx264 @ 02ca3c00] using SAR=200/201
[libx264 @ 02ca3c00] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 02ca3c00] profile High, level 4.1
[libx264 @ 02ca3c00] 264 - core 125 r2200 999b753 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.or
g/x264.html - options: cabac=1 ref=8 deblock=1:-1:-1 analyse=0x3:0x113 me=hex subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1
 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_th
reads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=
2 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 kOutput #0, mp4, to 'RemuxSup Fail H264.mp4':
  Metadata:
    encoder         : Lavf54.6.101
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 720x400 [SAR 200:201 DAR 120:67], q=-1--1, 2000 kb/s, 25
 tbn, 25 tbc
    Stream #0:1(dos): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> libx264)
  Stream #0:1 -> #0:1 (ac3 -> libvo_aacenc)
Press [q] to stop, [?] for help
Input stream #0:1 frame changed from rate:48000 fmt:s16 ch:2 chl:stereo to rate:48000 fmt:s16 ch:6 chl:5.1(side)
-async is forwarded to lavfi similarly to -af aresample=min_comp=0.001:min_hard_comp=0.100000.
-vol is forwarded to lavfi similarly to -af volume=4.464844.
[volume @ 02c85f60] volume=4.464844
[aresample @ 02c85e40] chl:5.1(side) fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:48000Hz

D:\Test Videos\MCEBuddyArchive\tools>ffmpeg -async 1 -threads 0 -drc_scale 0.8 -y -i "RemuxSup Fail H264.ts" -ss 3 -vf y
adif=0:-1,hqdn3d,crop=1920:1072:0:4,scale=720:400 -vcodec libx264 -b 2000000 -flags +loop -cmp +chroma -deblock -1:-1 -b
t 256k -refs 8 -bf 3 -b_strategy 2 -coder 1 -me_method hex -me_range 16 -subq 8 -partitions +parti4x4+parti8x8+partp8x8+
partb8x8 -weightb 1 -mixed-refs 1 -8x8dct 1 -g 25 -keyint_min 20 -level 41 -trellis 1 -sc_threshold 40 -i_qfactor 0.71 -
acodec libvo_aacenc -ab 192k -vol 1143 -ac 2 "RemuxSup Fail H264.mp4"
ffmpeg version N-41578-ga5c1a0c Copyright (c) 2000-2012 the FFmpeg developers
  built on Jun 13 2012 22:34:53 with gcc 4.6.3
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enab
le-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable
-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschro
edinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
libvorbis --enable-libvpx --ena  libavutil      51. 58.100 / 51. 58.100
  libavcodec     54. 25.100 / 54. 25.100
  libavformat    54.  6.101 / 54.  6.101
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 79.100 /  2. 79.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mpegts, from 'RemuxSup Fail H264.ts':
  Duration: 00:01:00.76, start: 1.400000, bitrate: 13806 kb/s
  Program 1
    Metadata:
      service_name    : Canal+ Comedia HD
      service_provider: Canal+ Comedia HD
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 104857
kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](dos): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, s16, 192 kb/s
Please use -b:a or -b:v, -b is ambiguous
[Parsed_yadif_0 @ 03236080] mode:0 parity:-1 auto_enable:0
[Parsed_hqdn3d_1 @ 03236020] ls:4.000000 cs:3.000000 lt:6.000000 ct:4.500000
[buffer @ 032364a0] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:1/1 sws_param:flags=2
[ffmpeg_buffersink @ 03236560] No opaque field provided
[Parsed_crop_2 @ 03236260] w:1920 h:1080 sar:1/1 -> w:1920 h:1072 sar:1/1
[Parsed_scale_3 @ 03236380] w:1920 h:1072 fmt:yuv420p sar:1/1 -> w:720 h:400 fmt:yuv420p sar:200/201 flags:0x4
-async is forwarded to lavfi similarly to -af aresample=min_comp=0.001:min_hard_comp=0.100000.
-vol is forwarded to lavfi similarly to -af volume=4.464844.
[volume @ 03236a40] volume=4.464844
[aresample @ 03236920] chl:stereo fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:48000Hz
[libx264 @ 03269bc0] using SAR=200/201
[libx264 @ 03269bc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 03269bc0] profile High, level 4.1
[libx264 @ 03269bc0] 264 - core 125 r2200 999b753 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.or
g/x264.html - options: cabac=1 ref=8 deblock=1:-1:-1 analyse=0x3:0x113 me=hex subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1
 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_th
reads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=
2 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 kOutput #0, mp4, to 'RemuxSup Fail H264.mp4':
  Metadata:
    encoder         : Lavf54.6.101
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 720x400 [SAR 200:201 DAR 120:67], q=-1--1, 2000 kb/s, 25
 tbn, 25 tbc
    Stream #0:1(dos): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video -> libx264)
  Stream #0:1 -> #0:1 (ac3 -> libvo_aacenc)
Press [q] to stop, [?] for help
Input stream #0:1 frame changed from rate:48000 fmt:s16 ch:2 chl:stereo to rate:48000 fmt:s16 ch:6 chl:5.1(side)
-async is forwarded to lavfi similarly to -af aresample=min_comp=0.001:min_hard_comp=0.100000.
-vol is forwarded to lavfi similarly to -af volume=4.464844.
[volume @ 03236a40] volume=4.464844
[aresample @ 03236920] chl:5.1(side) fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:48000Hz

The bare minimum command I've been able to use to replicate this issues (both async and threads needs to be used with drc for ffmpeg to crash).

ffmpeg -async 1 -threads 0 -drc_scale 0.8 -y -i "RemuxSup Fail H264.ts" -vn -acodec libvo_aacenc -ab 192k "RemuxSup Fail H264.mp4"

OUTPUT:

ffmpeg version N-41578-ga5c1a0c Copyright (c) 2000-2012 the FFmpeg developers
  built on Jun 13 2012 22:34:53 with gcc 4.6.3
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enab
le-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable
-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschro
edinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
libvorbis --enable-libvpx --ena  libavutil      51. 58.100 / 51. 58.100
  libavcodec     54. 25.100 / 54. 25.100
  libavformat    54.  6.101 / 54.  6.101
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 79.100 /  2. 79.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mpegts, from 'RemuxSup Fail H264.ts':
  Duration: 00:01:00.76, start: 1.400000, bitrate: 13806 kb/s
  Program 1
    Metadata:
      service_name    : Canal+ Comedia HD
      service_provider: Canal+ Comedia HD
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 104857
kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](dos): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, s16, 192 kb/s
-async is forwarded to lavfi similarly to -af aresample=min_comp=0.001:min_hard_comp=0.100000.
[aresample @ 020caea0] chl:stereo fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:48000Hz
Output #0, mp4, to 'RemuxSup Fail H264.mp4':
  Metadata:
    encoder         : Lavf54.6.101
    Stream #0:0(dos): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 192 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (ac3 -> libvo_aacenc)
Press [q] to stop, [?] for help
Input stream #0:1 frame changed from rate:48000 fmt:s16 ch:2 chl:stereo to rate:48000 fmt:s16 ch:6 chl:5.1(side)
-async is forwarded to lavfi similarly to -af aresample=min_comp=0.001:min_hard_comp=0.100000.
[aresample @ 01f30240] chl:5.1(side) fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:48000Hz

Attachments (1)

channelschange.ac3 (183.8 KB ) - added by Carl Eugen Hoyos 12 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by Carl Eugen Hoyos, 12 years ago

Backtrace etc. missing, please see http://ffmpeg.org/bugreports.html
Is the crash also reproducible with -acodec aac -strict experimental?

comment:2 by ami_stuff, 12 years ago

Cc: ami_stuff@o2.pl added

I have no libvo_aacenc build to test, but crashes (same effect with git-a5c1a0c 13-Jun-2012) here with:

(gdb) r -async 1 -i "RemuxSup Fail H264.ts" -vn out.wav
Starting program: d:\mingw\msys\1.0\ffmpeg-head-ab7d6cb\ffmpeg_g.exe -async 1 -i
 "RemuxSup Fail H264.ts" -vn out.wav
[New Thread 3120.0xca4]
ffmpeg version 0.10.2.git-ab7d6cb Copyright (c) 2000-2012 the FFmpeg developers
  built on May 30 2012 13:37:47 with gcc 4.6.1
  configuration: --disable-ffprobe --enable-gpl
  libavutil      51. 55.100 / 51. 55.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.101 / 54.  6.101
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[mpeg2video @ 041180e0] Warning: not compiled with thread support, using thread
emulation
[ac3 @ 041184c0] Warning: not compiled with thread support, using thread emulati
on
Input #0, mpegts, from 'RemuxSup Fail H264.ts':
  Duration: 00:01:00.76, start: 1.400000, bitrate: 13806 kb/s
  Program 1
    Metadata:
      service_name    : Canal+ Comedia HD
      service_provider: Canal+ Comedia HD
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420
p, 1920x1080 [SAR 1:1 DAR 16:9], 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](dos): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, ste
reo, s16, 192 kb/s
-async is forwarded to lavfi similarly to -af aresample=min_comp=0.001:min_hard_
comp=0.100000.
[aresample @ 03bcbf40] chl:stereo fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:4800
0Hz
[pcm_s16le @ 03bbc7c0] Warning: not compiled with thread support, using thread e
mulation
[ac3 @ 041184c0] Warning: not compiled with thread support, using thread emulati
on
Output #0, wav, to 'out.wav':
  Metadata:
    encoder         : Lavf54.6.101
    Stream #0:0(dos): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo
, s16, 1536 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (ac3 -> pcm_s16le)
Press [q] to stop, [?] for help
Input stream #0:1 frame changed from rate:48000 fmt:s16 ch:2 chl:stereo to rate:
48000 fmt:s16 ch:6 chl:5.1(side)
-async is forwarded to lavfi similarly to -af aresample=min_comp=0.001:min_hard_
comp=0.100000.
[aresample @ 03bcd620] chl:5.1(side) fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:4
8000Hz

Program received signal SIGSEGV, Segmentation fault.
0x00aa35f8 in copy (out=0x22de88, in=0x413890c, count=2312856)
    at libswresample/swresample.c:385
385             memcpy(out->ch[0], in->ch[0], count*out->ch_count*out->bps);
(gdb) bt
#0  0x00aa35f8 in copy (out=0x22de88, in=0x413890c, count=2312856)
    at libswresample/swresample.c:385
#1  0x00aa56ed in swr_convert (s=0x4138880, out_arg=0x0, out_count=0,
    in_arg=0x22e090, in_count=2312856) at libswresample/swresample.c:710
#2  0x00aa5c91 in swr_inject_silence (s=0x4138880, count=2312856)
    at libswresample/swresample.c:750
#3  0x00aa5e59 in swr_next_pts (s=0x4138880, pts=111017113600)
    at libswresample/swresample.c:767
#4  0x00422a4c in filter_samples (inlink=0x3bce4a0, insamplesref=0x3bced20)
    at libavfilter/af_aresample.c:182
#5  0x0042089c in ff_filter_samples (link=0x3bce4a0, samplesref=0x3bced20)
    at libavfilter/audio.c:217
#6  0x0041cad0 in request_frame (link=0x3bce4a0)
    at libavfilter/buffersrc.c:392
#7  0x00419d93 in avfilter_request_frame (link=0x3bce4a0)
    at libavfilter/avfilter.c:275
#8  0x00422811 in request_frame (outlink=0x3bce540)
    at libavfilter/af_aresample.c:214
#9  0x00419d93 in avfilter_request_frame (link=0x3bcd560)
    at libavfilter/avfilter.c:275
#10 0x0041be80 in av_buffersink_read (ctx=0x3bcd900, buf=0x22e8b4)
    at libavfilter/buffersink.c:108
#11 0x00406e83 in poll_filters () at ffmpeg.c:2129
#12 0x0040e730 in transcode () at ffmpeg.c:3662
#13 0x00b12f42 in main (argc=7, argv=0x3bc0dc0) at ffmpeg.c:5926
(gdb)

comment:3 by ramitb, 12 years ago

I dont' have access to building GDB unfortunately so theres now way for me to provide a backtrace.

But here is what I've got from Visual Studio debugger

>	msvcrt.dll!758599e4() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for msvcrt.dll]	
 	ffmpeg.exe!00acd7fc() 	
 	ffmpeg.exe!00acfd34() 	
 	ffmpeg.exe!00b1b2a2() 	
 	ffmpeg.exe!004289fa() 	
 	ffmpeg.exe!004263d2() 	
 	ffmpeg.exe!00420944() 	
 	ffmpeg.exe!0041d72c() 	
 	ffmpeg.exe!004287ba() 	
 	ffmpeg.exe!0041c95c() 	
 	msvcrt.dll!75859d45() 	
 	ffmpeg.exe!00b1bc31() 	
 	msvcrt.dll!75859d45() 	
 	ffmpeg.exe!00b1bddc() 	
 	ffmpeg.exe!0047c5d7() 	
 	ffmpeg.exe!00478ca1() 	
 	msvcrt.dll!758598cd() 	
 	msvcrt.dll!75876d62() 	
 	ffmpeg.exe!00b1ac82() 	
 	ffmpeg.exe!00b1b169() 	
 	ffmpeg.exe!004f1411() 	
 	msvcrt.dll!7585a53a() 	
 	KernelBase.dll!75606cc0() 	
 	KernelBase.dll!75606cd2() 	
 	ffmpeg.exe!0114c5be() 	
 	ffmpeg.exe!01140b5e() 	
 	ffmpeg.exe!00b1d3f2() 	
 	ffmpeg.exe!00b1b7f6() 	
 	ffmpeg.exe!0040176c() 	
 	ffmpeg.exe!00413d66() 	
 	ntdll.dll!77406054() 	
 	KernelBase.dll!7560dda0() 	
 	ffmpeg.exe!004013fa() 	
 	kernel32.dll!76d6ed6c() 	
 	ntdll.dll!7742377b() 	
 	ntdll.dll!7742374e() 	

It crashed at instruction 00ACD7FC:

00ACD7AC  lea         esi,[esi]  
00ACD7B0  mov         eax,dword ptr [ebx+88h]  
00ACD7B6  mov         edx,dword ptr [ebx+edi*4]  
00ACD7B9  imul        eax,ebp  
00ACD7BC  mov         ecx,dword ptr [esi+edi*4]  
00ACD7BF  add         edi,1  
00ACD7C2  mov         dword ptr [esp+8],eax  
00ACD7C6  mov         dword ptr [esp+4],ecx  
00ACD7CA  mov         dword ptr [esp],edx  
00ACD7CD  call        0114E510  
00ACD7D2  cmp         dword ptr [ebx+84h],edi  
00ACD7D8  jg          00ACD7B0  
00ACD7DA  add         esp,2Ch  
00ACD7DD  pop         ebx  
00ACD7DE  pop         esi  
00ACD7DF  pop         edi  
00ACD7E0  pop         ebp  
00ACD7E1  ret  
00ACD7E2  imul        edx,ebp  
00ACD7E5  mov         ecx,dword ptr [ebx]  
00ACD7E7  imul        eax,edx  
00ACD7EA  mov         edx,dword ptr [esi]  
00ACD7EC  mov         dword ptr [esp],ecx  
00ACD7EF  mov         dword ptr [esp+8],eax  
00ACD7F3  mov         dword ptr [esp+4],edx  
00ACD7F7  call        0114E510  
'''00ACD7FC  add         esp,2Ch ''' 
00ACD7FF  pop         ebx  
00ACD800  pop         esi  
00ACD801  pop         edi  
00ACD802  pop         ebp  
00ACD803  ret  

Registers:

EAX = 05427F60 EBX = 00000000 ECX = 0046BFF0 EDX = 00000000 ESI = 04B5FFFC EDI = 05D0FFFC EIP = 00ACD7FC ESP = 0022E330 EBP = 00234A98 EFL = 00000000 
Last edited 12 years ago by ramitb (previous) (diff)

by Carl Eugen Hoyos, 12 years ago

Attachment: channelschange.ac3 added

comment:4 by Carl Eugen Hoyos, 12 years ago

Component: undeterminedavfilter
Keywords: aconvert added
Reproduced by developer: set
Status: newopen
Summary: FFMPEG Crashing on converting AC3 to AACaconvert crashes on channel count change
Version: unspecifiedgit-master
(gdb) r -async 1 -i channelschange.ac3 -f null -
Starting program: /home/cehoyos/Projects/FFmpeg/ffmpeg_g -async 1 -i channelschange.ac3 -f null -
[Thread debugging using libthread_db enabled]
ffmpeg version N-41656-g1125606 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jun 17 2012 21:02:16 with gcc 4.5.3
  configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc --enable-gpl
  libavutil      51. 58.100 / 51. 58.100
  libavcodec     54. 25.100 / 54. 25.100
  libavformat    54.  6.101 / 54.  6.101
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 81.100 /  2. 81.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[ac3 @ 0x14b2120] max_analyze_duration 5000000 reached at 5024000
[ac3 @ 0x14b2120] Estimating duration from bitrate, this may be inaccurate
Input #0, ac3, from 'channelschange.ac3':
  Duration: 00:00:07.84, start: 0.000000, bitrate: 192 kb/s
    Stream #0:0: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
-async is forwarded to lavfi similarly to -af aresample=min_comp=0.001:min_hard_comp=0.100000.
[aresample @ 0x14b2d40] chl:stereo fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:48000Hz
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf54.6.101
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (ac3 -> pcm_s16le)
Press [q] to stop, [?] for help
Input stream #0:0 frame changed from rate:48000 fmt:s16 ch:2 chl:stereo to rate:48000 fmt:s16 ch:6 chl:5.1(side)
-async is forwarded to lavfi similarly to -af aresample=min_comp=0.001:min_hard_comp=0.100000.
[aresample @ 0x14b77a0] chl:5.1(side) fmt:s16 r:48000Hz -> chl:stereo fmt:s16 r:48000Hz

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff66b0a37 in memcpy () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff66b0a37 in memcpy () from /lib64/libc.so.6
#1  0x0000000000aa8f33 in swr_convert (s=0x14fc280, out_arg=<value optimized out>, out_count=0,
    in_arg=<value optimized out>, in_count=296448) at libswresample/swresample.c:710
#2  0x0000000000aa959b in swr_inject_silence (s=0x14fc280, count=296448) at libswresample/swresample.c:750
#3  0x0000000000aa9721 in swr_next_pts (s=0x14fc280, pts=<value optimized out>)
    at libswresample/swresample.c:767
#4  0x000000000044e3b2 in filter_samples (inlink=0x14b2c80, insamplesref=0x14e2160)
    at libavfilter/af_aresample.c:182
#5  0x000000000041f1f3 in ff_filter_samples (link=0x14b2c80, samplesref=<value optimized out>)
    at libavfilter/audio.c:214
#6  0x0000000000423caa in request_frame (link=0x14b2c80) at libavfilter/buffersrc.c:445
#7  0x00000000004211ce in ff_request_frame (link=<value optimized out>) at libavfilter/avfilter.c:325
#8  avfilter_request_frame (link=<value optimized out>) at libavfilter/avfilter.c:594
#9  0x000000000044e203 in request_frame (outlink=0x14b8280) at libavfilter/af_aresample.c:214
#10 0x0000000000420370 in ff_request_frame (link=<value optimized out>) at libavfilter/avfilter.c:325
#11 0x00000000004237c2 in av_buffersink_read (ctx=0x14b2b40, buf=0x7fffffffcb90)
    at libavfilter/buffersink.c:109
#12 0x000000000040d152 in poll_filters () at ffmpeg.c:1927
#13 0x0000000000410e83 in transcode () at ffmpeg.c:3608
#14 0x00000000004151b4 in main (argc=<value optimized out>, argv=<value optimized out>) at ffmpeg.c:5917

comment:5 by Carl Eugen Hoyos, 12 years ago

Summary: aconvert crashes on channel count changearesample crashes on channel count change

comment:6 by Carl Eugen Hoyos, 12 years ago

The crash is fixed, but audio output is broken after channel count change if -async 1 was used.

comment:7 by Michael Niedermayer, 12 years ago

Component: avfilterswresample
Resolution: fixed
Status: openclosed

locally fixed, will be in my next git push

Note: See TracTickets for help on using tickets.