[FFmpeg-trac] #4914(avformat:new): Segmentation fault creating MXF transcoded from mp2

FFmpeg trac at avcodec.org
Wed Oct 14 14:07:58 CEST 2015


#4914: Segmentation fault creating MXF transcoded from mp2
------------------------------------+------------------------------------
             Reporter:  wim_arbor   |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  important   |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  mxf         |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by cehoyos):

 Thank you for uploading again, I don't know what happened to the original
 files!

 Regression since 4818388e6c219bf48fa93bf76ee6ab3dc3fb1e8f
 {{{
 (gdb) r -i xdcam8mp2-1s_small.ts -c:a pcm_s16le -c:v copy -ss 1 out.mxf
 Starting program: ffmpeg_g -i xdcam8mp2-1s_small.ts -c:a pcm_s16le -c:v
 copy -ss 1 out.mxf
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/lib64/libthread_db.so.1".
 ffmpeg version N-75984-gfcfb66b Copyright (c) 2000-2015 the FFmpeg
 developers
   built with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl
   libavutil      55.  3.100 / 55.  3.100
   libavcodec     57.  6.100 / 57.  6.100
   libavformat    57.  3.100 / 57.  3.100
   libavdevice    57.  0.100 / 57.  0.100
   libavfilter     6. 11.100 /  6. 11.100
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.100 /  2.  0.100
   libpostproc    54.  0.100 / 54.  0.100
 Input #0, mpegts, from 'xdcam8mp2-1s_small.ts':
   Duration: 00:00:01.00, start: 1.400000, bitrate: 4058 kb/s
   Program 1
     Metadata:
       service_name    : Service01
       service_provider: FFmpeg
     Stream #0:0[0x100]: Video: mpeg2video (4:2:2) ([2][0][0][0] / 0x0002),
 yuv422p(tv), 480x270 [SAR 1:1 DAR 16:9], max. 104857 kb/s, 29.97 fps,
 29.97 tbr, 90k tbn, 59.94 tbc
     Stream #0:1[0x101]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
 stereo, s16p, 384 kb/s
 [New Thread 0x7ffff14f0700 (LWP 2050)]
 [New Thread 0x7ffff0cef700 (LWP 2051)]
 [New Thread 0x7ffff04ee700 (LWP 2052)]
 [New Thread 0x7fffefced700 (LWP 2053)]
 [New Thread 0x7fffef4ec700 (LWP 2054)]
 [New Thread 0x7fffeeceb700 (LWP 2055)]
 [New Thread 0x7fffee4ea700 (LWP 2056)]
 [New Thread 0x7fffedce9700 (LWP 2057)]
 [New Thread 0x7fffed4e8700 (LWP 2058)]
 Output #0, mxf, to 'out.mxf':
   Metadata:
     encoder         : Lavf57.3.100
     Stream #0:0: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv422p,
 480x270 [SAR 1:1 DAR 16:9], q=2-31, max. 104857 kb/s, 29.97 fps, 29.97
 tbr, 29.97 tbn, 29.97 tbc
     Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
     Metadata:
       encoder         : Lavc57.6.100 pcm_s16le
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (mp2 (native) -> pcm_s16le (native))
 Press [q] to stop, [?] for help
 [mxf @ 0x1cdd6c0] -d10_channelcount requires MXF D-10 and will be ignored

 Program received signal SIGSEGV, Segmentation fault.
 0x000000000062b5bf in mxf_write_packet (s=<optimized out>, pkt=<optimized
 out>) at libavformat/mxfenc.c:2455
 2455            mxf->index_entries[mxf->edit_units_count-1].slice_offset =
 (gdb) bt
 #0  0x000000000062b5bf in mxf_write_packet (s=<optimized out>,
 pkt=<optimized out>) at libavformat/mxfenc.c:2455
 #1  0x0000000000618e7d in write_packet (s=s at entry=0x1cdd6c0,
 pkt=pkt at entry=0x7fffffffd680) at libavformat/mux.c:660
 #2  0x000000000061b208 in av_write_trailer (s=0x1cdd6c0) at
 libavformat/mux.c:998
 #3  0x0000000000495392 in transcode () at ffmpeg.c:4002
 #4  0x0000000000478c4b in main (argc=<optimized out>, argv=0x7fffffffdce8)
 at ffmpeg.c:4151
 (gdb) disass $pc-32,$pc+32
 Dump of assembler code from 0x62b59f to 0x62b5df:
    0x000000000062b59f <mxf_write_packet+1167>:  add    %ecx,(%rdi)
    0x000000000062b5a1 <mxf_write_packet+1169>:  test   %ecx,%esi
    0x000000000062b5a3 <mxf_write_packet+1171>:  (bad)
    0x000000000062b5a4 <mxf_write_packet+1172>:  (bad)
    0x000000000062b5a5 <mxf_write_packet+1173>:  decl   0x408d2843(%rbx)
    0x000000000062b5ab <mxf_write_packet+1179>:  decl   -0x73(%rax)
    0x000000000062b5ae <mxf_write_packet+1182>:  adc    $0x40,%al
    0x000000000062b5b0 <mxf_write_packet+1184>:  mov    0x20(%rbx),%rax
    0x000000000062b5b4 <mxf_write_packet+1188>:  lea    (%rax,%rdx,8),%rax
    0x000000000062b5b8 <mxf_write_packet+1192>:  mov    0x80(%rbx),%rdx
 => 0x000000000062b5bf <mxf_write_packet+1199>:  sub    0x8(%rax),%edx
    0x000000000062b5c2 <mxf_write_packet+1202>:  mov    %edx,0x10(%rax)
    0x000000000062b5c5 <mxf_write_packet+1205>:  jmpq   0x62b474
 <mxf_write_packet+868>
    0x000000000062b5ca <mxf_write_packet+1210>:  nopw   0x0(%rax,%rax,1)
    0x000000000062b5d0 <mxf_write_packet+1216>:  and    $0x1ff,%ebp
    0x000000000062b5d6 <mxf_write_packet+1222>:  je     0x62b4de
 <mxf_write_packet+974>
    0x000000000062b5dc <mxf_write_packet+1228>:  jmpq   0x62b4a0
 <mxf_write_packet+912>
 End of assembler dump.
 (gdb) info register
 rax            0x1801d22f38     103109766968
 rbx            0x1cb7b20        30112544
 rcx            0x7ffff627528d   140737323160205
 rdx            0x0      0
 rsi            0x1cdec20        30272544
 rdi            0x0      0
 rbp            0x0      0x0
 rsp            0x7fffffffd540   0x7fffffffd540
 r8             0x0      0
 r9             0x1ceab00        30321408
 r10            0x7fffffffd1b0   140737488343472
 r11            0x0      0
 r12            0x0      0
 r13            0x0      0
 r14            0x7fffffffd680   140737488344704
 r15            0x1cdd6c0        30267072
 rip            0x62b5bf 0x62b5bf <mxf_write_packet+1199>
 eflags         0x10246  [ PF ZF IF RF ]
 cs             0x33     51
 ss             0x2b     43
 ds             0x0      0
 es             0x0      0
 fs             0x0      0
 gs             0x0      0
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4914#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list