Changes between Initial Version and Version 1 of Ticket #2213


Ignore:
Timestamp:
Jan 31, 2013, 1:40:04 AM (4 years ago)
Author:
cehoyos
Comment:
(gdb) r -i ticket2213.mkv -scodec mov_text -map 0 out.mp4
Starting program: ffmpeg_g -i ticket2213.mkv -scodec mov_text -map 0 out.mp4
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
ffmpeg version N-49468-ga084884 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 31 2013 00:34:25 with gcc 4.7 (SUSE Linux)
  configuration: --disable-indev=jack --disable-optimizations --disable-asm --disable-yasm
  libavutil      52. 17.100 / 52. 17.100
  libavcodec     54. 91.100 / 54. 91.100
  libavformat    54. 61.104 / 54. 61.104
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 34.101 /  3. 34.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
Input #0, matroska,webm, from 'ticket2213.mkv':
  Metadata:
    title           : Mahou Shoujo Madoka Magika Episode 04 - Miracles and Magic Do Exist
    ENCODER         : Lavf54.61.104
  Duration: 00:24:20.02, start: 0.000000, bitrate: 1 kb/s
    Chapter #0.0: start 0.000000, end 113.155000
    Metadata:
      title           : Prologue
    Chapter #0.1: start 113.155000, end 203.120000
    Metadata:
      title           : Opening
    Chapter #0.2: start 203.120000, end 774.065000
    Metadata:
      title           : Part A
    Chapter #0.3: start 774.065000, end 1345.261000
    Metadata:
      title           : Part B
    Chapter #0.4: start 1345.261000, end 1435.100000
    Metadata:
      title           : Ending
    Chapter #0.5: start 1435.100000, end 1462.185000
    Metadata:
      title           : Preview
    Stream #0:0(eng): Subtitle: ssa (default)
    Metadata:
      title           : Subtitle track
      LANGUAGE        : eng
    Stream #0:1(eng): Subtitle: ssa
    Metadata:
      title           : Subtitle track - Commentary
      LANGUAGE        : eng
    Stream #0:2(eng): Subtitle: ssa
    Metadata:
      title           : Subtitle track - Colorless
      LANGUAGE        : eng
Output #0, mp4, to 'out.mp4':
  Metadata:
    title           : Mahou Shoujo Madoka Magika Episode 04 - Miracles and Magic Do Exist
    encoder         : Lavf54.61.104
    Chapter #0.0: start 0.000000, end 113.155000
    Metadata:
      title           : Prologue
    Chapter #0.1: start 113.155000, end 203.120000
    Metadata:
      title           : Opening
    Chapter #0.2: start 203.120000, end 774.065000
    Metadata:
      title           : Part A
    Chapter #0.3: start 774.065000, end 1345.261000
    Metadata:
      title           : Part B
    Chapter #0.4: start 1345.261000, end 1435.100000
    Metadata:
      title           : Ending
    Chapter #0.5: start 1435.100000, end 1462.185000
    Metadata:
      title           : Preview
    Stream #0:0(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008) (default)
    Metadata:
      title           : Subtitle track
      LANGUAGE        : eng
    Stream #0:1(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008)
    Metadata:
      title           : Subtitle track - Commentary
      LANGUAGE        : eng
    Stream #0:2(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008)
    Metadata:
      title           : Subtitle track - Colorless
      LANGUAGE        : eng
Stream mapping:
  Stream #0:0 -> #0:0 (ass -> mov_text)
  Stream #0:1 -> #0:1 (ass -> mov_text)
  Stream #0:2 -> #0:2 (ass -> mov_text)
Press [q] to stop, [?] for help

Program received signal SIGSEGV, Segmentation fault.
0x00000000004f7418 in ff_interleave_packet_per_dts (s=0x16d23c0, out=0x7fffffffd250, pkt=0x0, flush=0) at libavformat/mux.c:646
646                         av_rescale_q(s->streams[i]->last_in_packet_buffer->pkt.dts,
(gdb) bt
#0  0x00000000004f7418 in ff_interleave_packet_per_dts (s=0x16d23c0, out=0x7fffffffd250, pkt=0x0, flush=0) at libavformat/mux.c:646
#1  0x00000000004f77da in interleave_packet (s=0x16d23c0, out=0x7fffffffd250, in=0x0, flush=0) at libavformat/mux.c:725
#2  0x00000000004f7901 in av_interleaved_write_frame (s=0x16d23c0, pkt=0x0) at libavformat/mux.c:753
#3  0x0000000000412f5b in write_frame (s=0x16d23c0, pkt=0x7fffffffd4d0, ost=0x16e1340) at ffmpeg.c:599
#4  0x0000000000413a55 in do_subtitle_out (s=0x16d23c0, ost=0x16e1340, ist=0x16d1e90, sub=0x7fffffffd600) at ffmpeg.c:786
#5  0x0000000000417e7d in transcode_subtitles (ist=0x16d1e90, pkt=0x7fffffffd670, got_output=0x7fffffffd6cc) at ffmpeg.c:1771
#6  0x00000000004184a4 in output_packet (ist=0x16d1e90, pkt=0x7fffffffd860) at ffmpeg.c:1855
#7  0x000000000041ce99 in process_input (file_index=0) at ffmpeg.c:2988
#8  0x000000000041d1f3 in transcode_step () at ffmpeg.c:3084
#9  0x000000000041d300 in transcode () at ffmpeg.c:3136
#10 0x000000000041d7de in main (argc=8, argv=0x7fffffffddc8) at ffmpeg.c:3311
(gdb) disass $pc-32,$pc+32
Dump of assembler code from 0x4f73f8 to 0x4f7438:
   0x00000000004f73f8 <ff_interleave_packet_per_dts+328>:       or     %cl,-0x75(%rax)
   0x00000000004f73fb <ff_interleave_packet_per_dts+331>:       rex.RB cwtl
   0x00000000004f73fd <ff_interleave_packet_per_dts+333>:       mov    0x30(%rax),%rax
   0x00000000004f7401 <ff_interleave_packet_per_dts+337>:       mov    -0x24(%rbp),%edx
   0x00000000004f7404 <ff_interleave_packet_per_dts+340>:       movslq %edx,%rdx
   0x00000000004f7407 <ff_interleave_packet_per_dts+343>:       shl    $0x3,%rdx
   0x00000000004f740b <ff_interleave_packet_per_dts+347>:       add    %rdx,%rax
   0x00000000004f740e <ff_interleave_packet_per_dts+350>:       mov    (%rax),%rax
   0x00000000004f7411 <ff_interleave_packet_per_dts+353>:       mov    0x130(%rax),%rax
=> 0x00000000004f7418 <ff_interleave_packet_per_dts+360>:       mov    0x8(%rax),%rax
   0x00000000004f741c <ff_interleave_packet_per_dts+364>:       mov    -0x50(%rbp),%rdx
   0x00000000004f7420 <ff_interleave_packet_per_dts+368>:       mov    0x38(%rcx),%rcx
   0x00000000004f7424 <ff_interleave_packet_per_dts+372>:       mov    %rcx,%rsi
   0x00000000004f7427 <ff_interleave_packet_per_dts+375>:       mov    %rax,%rdi
   0x00000000004f742a <ff_interleave_packet_per_dts+378>:       callq  0xc75a88 <av_rescale_q>
   0x00000000004f742f <ff_interleave_packet_per_dts+383>:       mov    %rax,%rbx
   0x00000000004f7432 <ff_interleave_packet_per_dts+386>:       movl   $0x1,-0x40(%rbp)
End of assembler dump.
(gdb) info register
rax            0x656d206e65646469       7308533428811752553
rbx            0x10f2af20       284340000
rcx            0x16e1d20        23993632
rdx            0x8      8
rsi            0xf4240  1000000
rdi            0x456b4  284340
rbp            0x7fffffffd1f0   0x7fffffffd1f0
rsp            0x7fffffffd170   0x7fffffffd170
r8             0x0      0
r9             0x0      0
r10            0x0      0
r11            0x246    582
r12            0x4054a0 4215968
r13            0x7fffffffddc0   140737488346560
r14            0x0      0
r15            0x0      0
rip            0x4f7418 0x4f7418 <ff_interleave_packet_per_dts+360>
eflags         0x10202  [ IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
$ valgrind ffmpeg_g -i ticket2213.mkv -scodec mov_text -map 0 out.mp4
==4035== Memcheck, a memory error detector
==4035== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==4035== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==4035== Command: ffmpeg_g -i ticket2213.mkv -scodec mov_text -map 0 out.mp4
==4035==
ffmpeg version N-49452-g91f3592 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 30 2013 10:43:05 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 17.100 / 52. 17.100
  libavcodec     54. 91.100 / 54. 91.100
  libavformat    54. 61.104 / 54. 61.104
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 34.101 /  3. 34.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
==4035== Invalid write of size 8
==4035==    at 0x5096DD: ebml_parse_elem (matroskadec.c:890)
==4035==    by 0x50999B: ebml_parse_elem (matroskadec.c:866)
==4035==    by 0x50999B: ebml_parse_elem (matroskadec.c:866)
==4035==    by 0x50A056: matroska_read_header (matroskadec.c:866)
==4035==    by 0x5A18AF: avformat_open_input (utils.c:626)
==4035==    by 0x451D20: open_input_file (ffmpeg_opt.c:767)
==4035==    by 0x45062F: open_files.isra.6 (ffmpeg_opt.c:2283)
==4035==    by 0x456068: ffmpeg_parse_options (ffmpeg_opt.c:2320)
==4035==    by 0x44E557: main (ffmpeg.c:3289)
==4035==  Address 0x66dcdac is 300 bytes inside a block of size 304 alloc'd
==4035==    at 0x4C2ABED: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4035==    by 0x4C2AD6F: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4035==    by 0x5095B3: ebml_parse_elem (matroskadec.c:929)
==4035==    by 0x50999B: ebml_parse_elem (matroskadec.c:866)
==4035==    by 0x50999B: ebml_parse_elem (matroskadec.c:866)
==4035==    by 0x50A056: matroska_read_header (matroskadec.c:866)
==4035==    by 0x5A18AF: avformat_open_input (utils.c:626)
==4035==    by 0x451D20: open_input_file (ffmpeg_opt.c:767)
==4035==    by 0x45062F: open_files.isra.6 (ffmpeg_opt.c:2283)
==4035==    by 0x456068: ffmpeg_parse_options (ffmpeg_opt.c:2320)
==4035==    by 0x44E557: main (ffmpeg.c:3289)
==4035==
Input #0, matroska,webm, from 'ticket2213.mkv':
  Metadata:
    title           : Mahou Shoujo Madoka Magika Episode 04 - Miracles and Magic Do Exist
    ENCODER         : Lavf54.61.104
  Duration: 00:24:20.02, start: 0.000000, bitrate: 1 kb/s
    Chapter #0.0: start 0.000000, end 113.155000
    Metadata:
      title           : Prologue
    Chapter #0.1: start 113.155000, end 203.120000
    Metadata:
      title           : Opening
    Chapter #0.2: start 203.120000, end 774.065000
    Metadata:
      title           : Part A
    Chapter #0.3: start 774.065000, end 1345.261000
    Metadata:
      title           : Part B
    Chapter #0.4: start 1345.261000, end 1435.100000
    Metadata:
      title           : Ending
    Chapter #0.5: start 1435.100000, end 1462.185000
    Metadata:
      title           : Preview
    Stream #0:0(eng): Subtitle: ssa (default)
    Metadata:
      title           : Subtitle track
      LANGUAGE        : eng
    Stream #0:1(eng): Subtitle: ssa
    Metadata:
      title           : Subtitle track - Commentary
      LANGUAGE        : eng
    Stream #0:2(eng): Subtitle: ssa
    Metadata:
      title           : Subtitle track - Colorless
      LANGUAGE        : eng
Output #0, mp4, to 'out.mp4':
  Metadata:
    title           : Mahou Shoujo Madoka Magika Episode 04 - Miracles and Magic Do Exist
    encoder         : Lavf54.61.104
    Chapter #0.0: start 0.000000, end 113.155000
    Metadata:
      title           : Prologue
    Chapter #0.1: start 113.155000, end 203.120000
    Metadata:
      title           : Opening
    Chapter #0.2: start 203.120000, end 774.065000
    Metadata:
      title           : Part A
    Chapter #0.3: start 774.065000, end 1345.261000
    Metadata:
      title           : Part B
    Chapter #0.4: start 1345.261000, end 1435.100000
    Metadata:
      title           : Ending
    Chapter #0.5: start 1435.100000, end 1462.185000
    Metadata:
      title           : Preview
    Stream #0:0(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008) (default)
    Metadata:
      title           : Subtitle track
      LANGUAGE        : eng
    Stream #0:1(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008)
    Metadata:
      title           : Subtitle track - Commentary
      LANGUAGE        : eng
    Stream #0:2(eng): Subtitle: mov_text ([8][0][0][0] / 0x0008)
    Metadata:
      title           : Subtitle track - Colorless
      LANGUAGE        : eng
Stream mapping:
  Stream #0:0 -> #0:0 (ass -> mov_text)
  Stream #0:1 -> #0:1 (ass -> mov_text)
  Stream #0:2 -> #0:2 (ass -> mov_text)
Press [q] to stop, [?] for help
==4035== Invalid write of size 1
==4035==    at 0xBB4503: av_strlcpy (avstring.c:86)
==4035==    by 0x863A06: mov_text_text_cb (movtextenc.c:90)
==4035==    by 0xAAA069: ff_ass_split_override_codes (ass_split.c:459)
==4035==    by 0x8638B0: mov_text_encode_frame (movtextenc.c:125)
==4035==    by 0x99A437: avcodec_encode_subtitle (utils.c:1493)
==4035==    by 0x45D8E0: transcode_subtitles (ffmpeg.c:765)
==4035==    by 0x45EC59: process_input (ffmpeg.c:1855)
==4035==    by 0x44EB2F: main (ffmpeg.c:3084)
==4035==  Address 0x670fdf0 is 0 bytes after a block of size 528 alloc'd
==4035==    at 0x4C290FE: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4035==    by 0x4C291A7: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4035==    by 0xBBEC31: av_mallocz (mem.c:92)
==4035==    by 0x5A283E: avformat_new_stream (utils.c:3292)
==4035==    by 0x450865: new_output_stream (ffmpeg_opt.c:904)
==4035==    by 0x451184: new_subtitle_stream (ffmpeg_opt.c:1255)
==4035==    by 0x455371: open_output_file (ffmpeg_opt.c:1596)
==4035==    by 0x45062F: open_files.isra.6 (ffmpeg_opt.c:2283)
==4035==    by 0x456091: ffmpeg_parse_options (ffmpeg_opt.c:2327)
==4035==    by 0x44E557: main (ffmpeg.c:3289)
==4035==
==4035== Invalid write of size 1
==4035==    at 0xBB4512: av_strlcpy (avstring.c:88)
==4035==    by 0x863A06: mov_text_text_cb (movtextenc.c:90)
==4035==    by 0xAAA069: ff_ass_split_override_codes (ass_split.c:459)
==4035==    by 0x8638B0: mov_text_encode_frame (movtextenc.c:125)
==4035==    by 0x99A437: avcodec_encode_subtitle (utils.c:1493)
==4035==    by 0x45D8E0: transcode_subtitles (ffmpeg.c:765)
==4035==    by 0x45EC59: process_input (ffmpeg.c:1855)
==4035==    by 0x44EB2F: main (ffmpeg.c:3084)
==4035==  Address 0x670fe3d is not stack'd, malloc'd or (recently) free'd
==4035==
==4035== Invalid write of size 1
==4035==    at 0xBB4503: av_strlcpy (avstring.c:86)
==4035==    by 0x863A06: mov_text_text_cb (movtextenc.c:90)
==4035==    by 0xAA9FBD: ff_ass_split_override_codes (ass_split.c:381)
==4035==    by 0x8638B0: mov_text_encode_frame (movtextenc.c:125)
==4035==    by 0x99A437: avcodec_encode_subtitle (utils.c:1493)
==4035==    by 0x45D8E0: transcode_subtitles (ffmpeg.c:765)
==4035==    by 0x45EC59: process_input (ffmpeg.c:1855)
==4035==    by 0x44EB2F: main (ffmpeg.c:3084)
==4035==  Address 0x670fe3d is not stack'd, malloc'd or (recently) free'd
==4035==
==4035== Invalid read of size 8
==4035==    at 0x53E895: ff_interleave_packet_per_dts (mux.c:646)
==4035==    by 0x53EC4C: av_interleaved_write_frame (mux.c:725)
==4035==    by 0x45A952: write_frame (ffmpeg.c:599)
==4035==    by 0x45D97B: transcode_subtitles (ffmpeg.c:786)
==4035==    by 0x45EC59: process_input (ffmpeg.c:1855)
==4035==    by 0x44EB2F: main (ffmpeg.c:3084)
==4035==  Address 0x81e3ab81e3a881eb is not stack'd, malloc'd or (recently) free'd
==4035==
==4035==
==4035== Process terminating with default action of signal 11 (SIGSEGV)
==4035==  General Protection Fault
==4035==    at 0x53E895: ff_interleave_packet_per_dts (mux.c:646)
==4035==    by 0x53EC4C: av_interleaved_write_frame (mux.c:725)
==4035==    by 0x45A952: write_frame (ffmpeg.c:599)
==4035==    by 0x45D97B: transcode_subtitles (ffmpeg.c:786)
==4035==    by 0x45EC59: process_input (ffmpeg.c:1855)
==4035==    by 0x44EB2F: main (ffmpeg.c:3084)
==4035==
==4035== HEAP SUMMARY:
==4035==     in use at exit: 3,335,029 bytes in 505 blocks
==4035==   total heap usage: 8,558 allocs, 8,053 frees, 7,640,933 bytes allocated
==4035==
==4035== LEAK SUMMARY:
==4035==    definitely lost: 16 bytes in 1 blocks
==4035==    indirectly lost: 79 bytes in 5 blocks
==4035==      possibly lost: 23,312 bytes in 1 blocks
==4035==    still reachable: 3,311,622 bytes in 498 blocks
==4035==         suppressed: 0 bytes in 0 blocks
==4035== Rerun with --leak-check=full to see details of leaked memory
==4035==
==4035== For counts of detected and suppressed errors, rerun with: -v
==4035== ERROR SUMMARY: 266 errors from 5 contexts (suppressed: 2 from 2)
Segmentation fault

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2213

    • Property Status changed from new to open
    • Property Priority changed from normal to important
    • Property Version changed from 1.1.1 to git-master
    • Property Keywords crash SIGSEGV ass mov_text added
    • Property Reproduced by developer set
  • Ticket #2213 – Description

    initial v1  
    22bytes): 
    33https://dl.dropbox.com/u/7221986/2.mkv 
    4  
     4{{{ 
    55ffmpeg -i 2.mkv -map 0:0 -map 0:2 -map 0:5 -map 0:4 -map 0:3 -scodec mov_text -vcodec copy -acodec copy 2.mp4 
    66ffmpeg version 1.1.1-tessus Copyright (c) 2000-2013 the FFmpeg developers 
     
    178178*** set a breakpoint in malloc_error_break to debug 
    179179Abort trap: 6 
     180}}}