[FFmpeg-trac] #371(avfilter:open): Segmentation fault or get core dump when trying to use transpose/hflip/vflip on some inputs

FFmpeg trac at avcodec.org
Fri Jul 29 15:15:30 CEST 2011


#371: Segmentation fault or get core dump when trying to use
transpose/hflip/vflip on some inputs
-----------------------------------+-----------------------
Reporter:  x2305andy2305x          |       Owner:
    Type:  defect                  |      Status:  open
Priority:  important               |   Component:  avfilter
 Version:  git-master              |  Resolution:
Keywords:  transpose, hflip,vflip  |  Blocked By:
Blocking:                          |  Reproduced:  1
Analyzed:  0                       |
-----------------------------------+-----------------------
Changes (by cehoyos):

 * version:  unspecified => git-master
 * component:  undetermined => avfilter
 * reproduced:  0 => 1


Comment:

 {{{
 (gdb) r -i tests/lena.pnm -vf transpose=3,hflip out.jpg
 Starting program: ffmpeg_g -i tests/lena.pnm -vf transpose=3,hflip out.jpg
 [Thread debugging using libthread_db enabled]
 [New Thread 0xb7b326c0 (LWP 23528)]
 ffmpeg version n0.8-749-g2dd2abe, Copyright (c) 2000-2011 the FFmpeg
 developers
   built on Jul 29 2011 15:09:21 with gcc 4.2.1 (SUSE Linux)
   configuration:
   libavutil    51. 11. 1 / 51. 11. 1
   libavcodec   53.  9. 0 / 53.  9. 0
   libavformat  53.  6. 0 / 53.  6. 0
   libavdevice  53.  2. 0 / 53.  2. 0
   libavfilter   2. 27. 3 /  2. 27. 3
   libswscale    2.  0. 0 /  2.  0. 0
 Input #0, image2, from 'tests/lena.pnm':
   Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
     Stream #0.0: Video: ppm, rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
 Incompatible pixel format 'rgb24' for codec 'mjpeg', auto-selecting format
 'yuvj420p'
 [buffer @ 0x8c99420] w:256 h:256 pixfmt:rgb24 tb:1/1000000 sar:0/1
 sws_param:
 [hflip @ 0x8ca0cc0] auto-inserting filter 'auto-inserted scaler 0' between
 the filter 'Parsed filter 0 transpose' and the filter 'Parsed filter 1
 hflip'
 [transpose @ 0x8ca08a0] w:256 h:256 dir:3 -> w:256 h:256
 rotation:clockwise vflip:1
 [scale @ 0x8ca67a0] w:256 h:256 fmt:rgb24 -> w:256 h:256 fmt:yuvj420p
 flags:0x4
 Output #0, image2, to 'out.jpg':
   Metadata:
     encoder         : Lavf53.6.0
     Stream #0.0: Video: mjpeg, yuvj420p, 256x256, q=2-31, 200 kb/s, 90k
 tbn, 25 tbc
 Stream mapping:
   Stream #0.0 -> #0.0
 Press [q] to stop, [?] for help

 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 0xb7b326c0 (LWP 23528)]
 0x0806644a in draw_slice (inlink=0x8ca6820, y=256, h=256, slice_dir=1) at
 libavfilter/vf_hflip.c:101
 101                         outrow[j] = inrow[-j];
 (gdb) bt
 #0  0x0806644a in draw_slice (inlink=0x8ca6820, y=256, h=256, slice_dir=1)
 at libavfilter/vf_hflip.c:101
 #1  0x08060198 in avfilter_draw_slice (link=0x8ca6820, y=256, h=256,
 slice_dir=1)
     at libavfilter/avfilter.c:589
 #2  0x0806a831 in draw_slice (link=0x8ca0f40, y=0, h=256, slice_dir=1) at
 libavfilter/vf_scale.c:317
 #3  0x08060198 in avfilter_draw_slice (link=0x8ca0f40, y=0, h=256,
 slice_dir=1) at libavfilter/avfilter.c:589
 #4  0x0806c38b in end_frame (inlink=0x8ca0b60) at
 libavfilter/vf_transpose.c:193
 #5  0x0805fbe7 in avfilter_end_frame (link=0x8ca0b60) at
 libavfilter/avfilter.c:541
 #6  0x0806d227 in request_frame (link=0x8ca0b60) at
 libavfilter/vsrc_buffer.c:197
 #7  0x08060834 in avfilter_request_frame (link=0x8ca10a0) at
 libavfilter/avfilter.c:478
 #8  0x0806d13c in av_vsink_buffer_get_video_buffer_ref (ctx=0x8c9f2a0,
 picref=0x8c9a3cc, flags=0)
     at libavfilter/vsink_buffer.c:83
 #9  0x0804e4e2 in output_packet (ist=0x8ca1ab0, ist_index=0,
 ost_table=0x8ca1a20, nb_ostreams=1,
     pkt=0xbfa9acb4) at ffmpeg.c:1733
 #10 0x08056262 in transcode (output_files=0x8740100, nb_output_files=1,
 input_files=0x8c9f358,
     nb_input_files=1, stream_maps=0x0, nb_stream_maps=0) at ffmpeg.c:2819
 #11 0x080573d5 in main (argc=Cannot access memory at address 0x0
 ) at ffmpeg.c:4575
 (gdb) disass $pc-32 $pc+32
 Dump of assembler code from 0x806642a to 0x806646a:
 0x0806642a <draw_slice+762>:    and    $0x44,%al
 0x0806642c <draw_slice+764>:    sar    %cl,%eax
 0x0806642e <draw_slice+766>:    test   %eax,%eax
 0x08066430 <draw_slice+768>:    mov    %esi,0x18(%esp)
 0x08066434 <draw_slice+772>:    jle    0x80662b8 <draw_slice+392>
 0x0806643a <draw_slice+778>:    lea    0x0(%esi),%esi
 0x08066440 <draw_slice+784>:    movzbl (%esi),%eax
 0x08066443 <draw_slice+787>:    sub    $0x1,%esi
 0x08066446 <draw_slice+790>:    mov    0x48(%esp),%edx
 0x0806644a <draw_slice+794>:    mov    %al,-0x1(%ebx,%edx,1)
 0x0806644e <draw_slice+798>:    mov    0x2c(%esp),%ecx
 0x08066452 <draw_slice+802>:    mov    %ebx,%edx
 0x08066454 <draw_slice+804>:    add    $0x1,%ebx
 0x08066457 <draw_slice+807>:    mov    %esi,0x18(%esp)
 0x0806645b <draw_slice+811>:    mov    0x18(%ecx),%edi
 0x0806645e <draw_slice+814>:    movzbl 0x54(%esp),%ecx
 0x08066463 <draw_slice+819>:    mov    %edi,%eax
 0x08066465 <draw_slice+821>:    sar    %cl,%eax
 0x08066467 <draw_slice+823>:    cmp    %edx,%eax
 0x08066469 <draw_slice+825>:    jg     0x8066440 <draw_slice+784>
 End of assembler dump.
 (gdb) info registers
 eax            0x0      0
 ecx            0x0      0
 edx            0x30db4e60       819678816
 ebx            0x1      1
 esp            0xbfa990d0       0xbfa990d0
 ebp            0x28000000       0x28000000
 esi            0x8d9ccde        148491486
 edi            0x100    256
 eip            0x806644a        0x806644a <draw_slice+794>
 eflags         0x10206  [ PF IF RF ]
 cs             0x73     115
 ss             0x7b     123
 ds             0x7b     123
 es             0x7b     123
 fs             0x0      0
 gs             0x33     51
 }}}

-- 
Ticket URL: <http://avcodec.org/trac/ffmpeg/ticket/371#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list