Opened 11 years ago
Closed 11 years ago
#4806 closed defect (fixed)
Segfault while writing Vorbis metadata
| Reported by: | turlando | Owned by: | |
|---|---|---|---|
| Priority: | important | Component: | avformat |
| Version: | git-master | Keywords: | ogg crash SIGSEGV regression |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | no |
Description
I'm trying to transcode a FLAC file (I've attached a sample media) to Ogg Vorbis through libvorbis but FFmpeg will segfault leaving a null size .ogg file in the working directory.
It seems that it is unable to write the metadata section to the Ogg file. Stripping out all the Vorbis comments from the FLAC and trying again will result in a correct conversion.
I've attached a backtrace too, which includes the command I'm running and the configure options.
Attachments (2)
Change History (5)
by , 11 years ago
| Attachment: | backtrace.txt added |
|---|
by , 11 years ago
| Attachment: | media_sample.flac added |
|---|
comment:1 by , 11 years ago
| Keywords: | ogg crash added |
|---|---|
| Priority: | normal → important |
comment:2 by , 11 years ago
| Keywords: | SIGSEGV regression added |
|---|---|
| Reproduced by developer: | set |
| Status: | new → open |
comment:3 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | open → closed |
Note:
See TracTickets
for help on using tickets.



$ valgrind ffmpeg_g -i media_sample.flac -acodec copy -vn out.ogg ==8551== Memcheck, a memory error detector ==8551== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==8551== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==8551== Command: ffmpeg_g -i media_sample.flac -acodec copy -vn out.ogg ==8551== ffmpeg version N-74652-g319440e Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.7 (SUSE Linux) configuration: --enable-gpl libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 58.100 / 56. 58.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 38.100 / 5. 38.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, flac, from 'media_sample.flac': Metadata: ALBUM : Sound Murderer ALBUM ARTIST : Remarc! ARTIST : Remarc BPM : 82 COMMENT : EAC v0.99pb5 => FLAC v1.2.1 => metaflac v1.2.1 EXTRACTIONLOG : Exact Audio Copy V0.99 prebeta 5 from 4. May 2009 : : EAC extraction logfile from 15. May 2009, 21:59 : : Various Artists / Sound Murderer : : Used drive : HL-DT-STDVD-RAM GH22NP20 Adapter: 1 ID: 0 : : Read mode : Secure : Utilize accurate stream : Yes : Defeat audio cache : Yes : Make use of C2 pointers : No : : Read offset correction : 102 : Overread into Lead-In and Lead-Out : No : Fill up missing offset samples with silence : Yes : Delete leading and trailing silent blocks : No : Null samples used in CRC calculations : Yes : Used interface : Native Win32 interface for Win NT & 2000 : Gap handling : Left out : : Used output format : User Defined Encoder : Selected bitrate : 128 kBit/s : Quality : Low : Add ID3 tag : No : Command line compressor : C:\Windows\System32\cmd.exe : Additional command line options : /a /d /k E:\afterripprocessing.bat "%a" "%t" "%g" "%y" %n "%m" %s %d "Planet Mu ZIQ084CD" : : : TOC of the extracted CD : : Track | Start | Length | Start sector | End sector : --------------------------------------------------------- : 1 | 0:00.00 | 0:23.11 | 0 | 1735 : 2 | 0:23.11 | 3:27.35 | 1736 | 17295 : 3 | 3:50.46 | 5:30.62 | 17296 | 42107 : 4 | 9:21.33 | 4:55.63 | 42108 | 64295 : 5 | 14:17.21 | 5:42.49 | 64296 | 89994 : 6 | 19:59.70 | 4:50.17 | 89995 | 111761 : 7 | 24:50.12 | 5:09.15 | 111762 | 134951 : 8 | 29:59.27 | 5:48.57 | 134952 | 161108 : 9 | 35:48.09 | 5:38.04 | 161109 | 186462 : 10 | 41:26.13 | 4:20.50 | 186463 | 206012 : 11 | 45:46.63 | 5:21.27 | 206013 | 230114 : 12 | 51:08.15 | 6:15.43 | 230115 | 258282 : 13 | 57:23.58 | 5:13.26 | 258283 | 281783 : : : Track 1 : : Filename E:\Remarc!_-_Sound_Murderer\01_-_Remarc_+_MC_Eksman_-_Intro.wav : : Pre-gap length 0:00:02.00 : : Peak level 62.8 % : Track quality 100.0 % : Test CRC 19F4AF0C : Copy CRC 19F4AF0C : Accurately ripped (confidence 1) [DE22D149] : Copy OK : : Track 2 : : Filename E:\Remarc!_-_Sound_Murderer\02_-_Remarc_-_Not_4_U.wav : : Peak level 100.0 % : Track quality 100.0 % : Test CRC 7B0DE60A : Copy CRC 7B0DE60A : Accurately ripped (confidence 1) [A6F403E5] : Copy OK : : Track 3 : : Filename E:\Remarc!_-_Sound_Murderer\03_-_Remarc_-_Ice_Cream_+_Syrup_(Hard_Mix).wav : : Peak level 84.1 % : Track quality 100.0 % : Test CRC BE323F65 : Copy CRC BE323F65 : Accurately ripped (confidence 1) [56482E12] : Copy OK : : Track 4 : : Filename E:\Remarc!_-_Sound_Murderer\04_-_Remarc_+_Simpleton_-_Unity_(Re-Mix).wav : : Peak level 100.0 % : Track quality 99.9 % : Test CRC 09542F12 : Copy CRC 09542F12 : Accurately ripped (confidence 1) [2723EAD7] : Copy OK : : Track 5 : : Filename E:\Remarc!_-_Sound_Murderer\05_-_Remarc_-_Drum_N'_Bass_Wise_(Remix).wav : : Peak level 97.7 % : Track quality 99.9 % : Test CRC C180D843 : Copy CRC C180D843 : Accurately ripped (confidence 1) [478FB578] : Copy OK : : Track 6 : : Filename E:\Remarc!_-_Sound_Murderer\06_-_Remarc_-_Sound_Murderer_(Loafin'_In_Brockley_Mix).wav : : Peak level 99.1 % : Track quality 99.9 % : Test CRC 03598502 : Copy CRC 03598502 : Accurately ripped (confidence 1) [4E072F71] : Copy OK : : Track 7 : : Filename E:\Remarc!_-_Sound_Murderer\07_-_Bagga_Worries_&_Jooxie_Nice_-_Legalise_(Remarc_VIP_Mix).wav : : Peak level 100.0 % : Track quality 100.0 % : Test CRC 9A1210A5 : Copy CRC 9A1210A5 : Accurately ripped (confidence 1) [A5A89418] : Copy OK : : Track 8 : : Filename E:\Remarc!_-_Sound_Murderer\08_-_Remarc_-_R.I.P._(Remarc_Remix).wav : : Peak level 92.2 % : Track quality 100.0 % : Test CRC 24C5DEA9 : Copy CRC 24C5DEA9 : Accurately ripped (confidence 1) [44E33AE8] : Copy OK : : Track 9 : : Filename E:\Remarc!_-_Sound_Murderer\09_-_Physics_N'_Tricks_-_Meridian_(Remarc_Remix).wav : : Peak level 86.1 % : Track quality 99.9 % : Test CRC 2C9F312B : Copy CRC 2C9F312B : Accurately ripped (confidence 1) [D1315115] : Copy OK : : Track 10 : : Filename E:\Remarc!_-_Sound_Murderer\10_-_Remarc_+_Schwarzenegger_-_For_Real_Remix.wav : : Peak level 93.2 % : Track quality 99.9 % : Test CRC F1E9891C : Copy CRC F1E9891C : Accurately ripped (confidence 1) [22817A10] : Copy OK : : Track 11 : : Filename E:\Remarc!_-_Sound_Murderer\11_-_Remarc_-_Thunderclap.wav : : Peak level 72.4 % : Track quality 100.0 % : Test CRC 15F2952B : Copy CRC 15F2952B : Accurately ripped (confidence 1) [64E1DA7B] : Copy OK : : Track 12 : : Filename E:\Remarc!_-_Sound_Murderer\12_-_Remarc_-_Menace,_J.A.P.M..wav : : Peak level 97.7 % : Track quality 99.9 % : Test CRC 5A0C6BA8 : Copy CRC 5A0C6BA8 : Accurately ripped (confidence 1) [288B8D41] : Copy OK : : Track 13 : : Filename E:\Remarc!_-_Sound_Murderer\13_-_Remarc_-_2-01.wav : : Peak level 88.1 % : Track quality 100.0 % : Test CRC C693FE85 : Copy CRC C693FE85 : Accurately ripped (confidence 1) [190913FD] : Copy OK : : : All tracks accurately ripped : : No errors occurred : : End of status report : GENRE : Jungle ORIGINALCUESHEET: REM GENRE Jungle : REM DATE 2003 : REM DISCID 9F0EAD0D : REM COMMENT "ExactAudioCopy v0.99pb5" : PERFORMER "Various Artists" : TITLE "Sound Murderer" : FILE "01_-_Remarc_+_MC_Eksman_-_Intro.wav" WAVE : TRACK 01 AUDIO : TITLE "Intro" : PERFORMER "Remarc + MC Eksman" : INDEX 01 00:00:00 : FILE "02_-_Remarc_-_Not_4_U.wav" WAVE : TRACK 02 AUDIO : TITLE "Not 4 U" : PERFORMER "Remarc" : INDEX 01 00:00:00 : FILE "03_-_Remarc_-_Ice_Cream_+_Syrup_(Hard_Mix).wav" WAVE : TRACK 03 AUDIO : TITLE "Ice Cream + Syrup (Hard Mix)" : PERFORMER "Remarc" : INDEX 01 00:00:00 : FILE "04_-_Remarc_+_Simpleton_-_Unity_(Re-Mix).wav" WAVE : TRACK 04 AUDIO : TITLE "Unity (Re-Mix)" : PERFORMER "Remarc + Simpleton" : INDEX 01 00:00:00 : FILE "05_-_Remarc_-_Drum_N'_Bass_Wise_(Remix).wav" WAVE : TRACK 05 AUDIO : TITLE "Drum N' Bass Wise (Remix)" : PERFORMER "Remarc" : INDEX 01 00:00:00 : FILE "06_-_Remarc_-_Sound_Murderer_(Loafin'_In_Brockley_Mix).wav" WAVE : TRACK 06 AUDIO : TITLE "Sound Murderer (Loafin' In Brockley Mix)" : PERFORMER "Remarc" : INDEX 01 00:00:00 : FILE "07_-_Bagga_Worries_&_Jooxie_Nice_-_Legalise_(Remarc_VIP_Mix).wav" WAVE : TRACK 07 AUDIO : TITLE "Legalise (Remarc VIP Mix)" : PERFORMER "Bagga Worries & Jooxie Nice" : INDEX 01 00:00:00 : FILE "08_-_Remarc_-_R.I.P._(Remarc_Remix).wav" WAVE : TRACK 08 AUDIO : TITLE "R.I.P. (Remarc Remix)" : PERFORMER "Remarc" : INDEX 01 00:00:00 : FILE "09_-_Physics_N'_Tricks_-_Meridian_(Remarc_Remix).wav" WAVE : TRACK 09 AUDIO : TITLE "Meridian (Remarc Remix)" : PERFORMER "Physics N' Tricks" : INDEX 01 00:00:00 : FILE "10_-_Remarc_+_Schwarzenegger_-_For_Real_Remix.wav" WAVE : TRACK 10 AUDIO : TITLE "For Real Remix" : PERFORMER "Remarc + Schwarzenegger" : INDEX 01 00:00:00 : FILE "11_-_Remarc_-_Thunderclap.wav" WAVE : TRACK 11 AUDIO : TITLE "Thunderclap" : PERFORMER "Remarc" : INDEX 01 00:00:00 : FILE "12_-_Remarc_-_Menace,_J.A.P.M..wav" WAVE : TRACK 12 AUDIO : TITLE "Menace, J.A.P.M." : PERFORMER "Remarc" : INDEX 01 00:00:00 : FILE "13_-_Remarc_-_2-01.wav" WAVE : TRACK 13 AUDIO : TITLE "2:01" : PERFORMER "Remarc" : INDEX 01 00:00:00 : PUBLISHER : Planet Mu ZIQ084CD REPLAYGAIN_ALBUM_GAIN: -6.23 dB REPLAYGAIN_ALBUM_PEAK: 1.00000000 REPLAYGAIN_REFERENCE_LOUDNESS: 89.0 dB REPLAYGAIN_TRACK_GAIN: -7.04 dB REPLAYGAIN_TRACK_PEAK: 0.99176025 TITLE : Sound Murderer (Loafin' In Brockley Mix) TOTALTRACKS : 13 track : 6 TRAKTOR4 : dlVHD{RKC"AAAA4wlZhtBAC"BAAA::<y~XAAAAAAAAL#*RFt?b&RiAAAAAAAuW1DOs&6+Z/wAAAAAAAAFBAAXL5d}LR^YBuWBAAAU5(d]"KDAAAAAA,FJAAAiBAAXLAAAAEtbARBQQaS,>KAhANBxNlB+hIApALB}IDH,>JArApB3L5FvWK"lANBMM5FBAF"VA?A|D<cp1CtQAyc|+`e5z?~*(4@vQ)q`s6dV`*O#L~si&N~E%S#@9{o?~M~,?t Duration: 00:04:50.23, start: 0.000000, bitrate: 56 kb/s Stream #0:0: Audio: flac, 44100 Hz, stereo, s16 Side data: replaygain: track gain - -7.040000, track peak - 0.000023, album gain - -6.230000, album peak - 0.000023, Stream #0:1: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 301x300 [SAR 72:72 DAR 301:300], 90k tbr, 90k tbn, 90k tbc Metadata: comment : Cover (front) title : front cover Stream #0:2: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 300x300 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn, 90k tbc Metadata: comment : Media (e.g. label side of CD) title : disc Stream #0:3: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 350x300 [SAR 72:72 DAR 7:6], 90k tbr, 90k tbn, 90k tbc Metadata: comment : Cover (back) title : back cover ==8551== Invalid write of size 4 ==8551== at 0x4C2D4FF: memset (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==8551== by 0x629A44: ogg_buffer_data.isra.5.constprop.13 (oggenc.c:249) ==8551== by 0x629E59: ogg_write_header (oggenc.c:555) ==8551== by 0x6091BA: avformat_write_header (mux.c:442) ==8551== by 0x48BCE8: transcode_init (ffmpeg.c:3208) ==8551== by 0x4920E5: transcode (ffmpeg.c:3948) ==8551== by 0x47602A: main (ffmpeg.c:4160) ==8551== Address 0xbb86a50 is 0 bytes after a block of size 65,392 alloc'd ==8551== at 0x4C290FE: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==8551== by 0x4C291A7: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==8551== by 0xF8F551: av_mallocz (mem.c:97) ==8551== by 0x629BC2: ogg_write_header (oggenc.c:461) ==8551== by 0x6091BA: avformat_write_header (mux.c:442) ==8551== by 0x48BCE8: transcode_init (ffmpeg.c:3208) ==8551== by 0x4920E5: transcode (ffmpeg.c:3948) ==8551== by 0x47602A: main (ffmpeg.c:4160) ==8551== ==8551== ==8551== Process terminating with default action of signal 11 (SIGSEGV) ==8551== Access not within mapped region at address 0xBF18000 ==8551== at 0x4C2D4FF: memset (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==8551== by 0x629A44: ogg_buffer_data.isra.5.constprop.13 (oggenc.c:249) ==8551== by 0x629E59: ogg_write_header (oggenc.c:555) ==8551== by 0x6091BA: avformat_write_header (mux.c:442) ==8551== by 0x48BCE8: transcode_init (ffmpeg.c:3208) ==8551== by 0x4920E5: transcode (ffmpeg.c:3948) ==8551== by 0x47602A: main (ffmpeg.c:4160) ==8551== If you believe this happened as a result of a stack ==8551== overflow in your program's main thread (unlikely but ==8551== possible), you can try to increase the size of the ==8551== main thread stack using the --main-stacksize= flag. ==8551== The main thread stack size used in this run was 8388608. ==8551== ==8551== HEAP SUMMARY: ==8551== in use at exit: 1,782,484 bytes in 477 blocks ==8551== total heap usage: 3,089 allocs, 2,612 frees, 4,818,929 bytes allocated ==8551== ==8551== LEAK SUMMARY: ==8551== definitely lost: 155,148 bytes in 39 blocks ==8551== indirectly lost: 0 bytes in 0 blocks ==8551== possibly lost: 0 bytes in 0 blocks ==8551== still reachable: 1,627,336 bytes in 438 blocks ==8551== suppressed: 0 bytes in 0 blocks ==8551== Rerun with --leak-check=full to see details of leaked memory ==8551== ==8551== For counts of detected and suppressed errors, rerun with: -v ==8551== ERROR SUMMARY: 841477 errors from 1 contexts (suppressed: 2 from 2) Segmentation fault