[FFmpeg-trac] #249(avfilter:open): Fix the filter remove-logo

FFmpeg trac at avcodec.org
Fri May 27 15:47:37 CEST 2011


#249: Fix the filter remove-logo
------------------------+-----------------------
Reporter:  pbasista     |       Owner:  michael
    Type:  defect       |      Status:  open
Priority:  normal       |   Component:  avfilter
 Version:  git-master   |  Resolution:
Keywords:  remove-logo  |  Blocked By:
Blocking:               |  Reproduced:  1
Analyzed:  0            |
------------------------+-----------------------
Changes (by cehoyos):

 * priority:  minor => normal
 * type:  enhancement => defect


Comment:

 Could you start gdb again and post the version of gdb (gdb -v) and the
 output of
 {{{
 (gdb) help disass
 }}}
 The issue is reproducible:
 {{{
 (gdb) r -i test.ts -an -vf mp=remove-logo:out0225.ppm out.avi
 ffmpeg version git-N-30308-g041dbd3, Copyright (c) 2000-2011 the FFmpeg
 developers
   built on May 27 2011 15:42:14 with gcc 4.5.3
   configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc --enable-gpl --disable-
 optimizations
   libavutil    51.  2. 2 / 51.  2. 2
   libavcodec   53.  6. 0 / 53.  6. 0
   libavformat  53.  2. 0 / 53.  2. 0
   libavdevice  53.  0. 0 / 53.  0. 0
   libavfilter   2. 11. 0 /  2. 11. 0
   libswscale    0. 14. 0 /  0. 14. 0
   libpostproc  51.  2. 0 / 51.  2. 0
 [mpeg2video @ 0x14820e0] mpeg_decode_postinit() failure
     Last message repeated 1 times
 [mpegts @ 0x147abc0] max_analyze_duration 5000000 reached at 5000000
 [NULL @ 0x14a3e00] start time is not set in av_estimate_timings_from_pts
 [NULL @ 0x14a7f00] start time is not set in av_estimate_timings_from_pts
 [NULL @ 0x14a9f80] start time is not set in av_estimate_timings_from_pts
 [NULL @ 0x14ac000] start time is not set in av_estimate_timings_from_pts
 [NULL @ 0x14ae080] start time is not set in av_estimate_timings_from_pts
 [NULL @ 0x14b0100] start time is not set in av_estimate_timings_from_pts
 Input #0, mpegts, from 'test.ts':
   Duration: 00:00:20.58, start: 73344.586911, bitrate: 4074 kb/s
   Program 10101
     Stream #0.0[0x3f2]: Video: mpeg2video (Main), yuv420p, 720x576 [PAR
 64:45 DAR 16:9], 4300 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
     Stream #0.1[0x3f3](ger): Audio: mp2, 48000 Hz, stereo, s16, 160 kb/s
 (clean effects)
     Stream #0.2[0x3f4](eng): Audio: mp2, 48000 Hz, stereo, s16, 160 kb/s
 (clean effects)
     Stream #0.3[0x3f5](ger): Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s
 (clean effects)
     Stream #0.4[0x3f6]: Data: [6][0][0][0] / 0x0006
     Stream #0.5[0x3f7](ger): Subtitle: [6][0][0][0] / 0x0006
     Stream #0.6[0x1b63]: Data: [11][0][0][0] / 0x000B
     Stream #0.7[0x1b64]: Data: [11][0][0][0] / 0x000B
     Stream #0.8[0x1b6d]: Data: [12][0][0][0] / 0x000C
     Stream #0.9[0x1b77]: Data: [11][0][0][0] / 0x000B
     Stream #0.10[0x1bbd]: Data: [5][0][0][0] / 0x0005
   Program 10102
   Program 10120
   Program 10122
 File 'out.avi' already exists. Overwrite ? [y/N] y
 [buffer @ 0x147dd20] w:720 h:576 pixfmt:yuv420p tb:1/1000000 sar:64/45
 sws_param:
 [mp @ 0x1521e00] This is a unholy filter, it will be purified by the
 ffmpeg exorcist team
 which will change its syntax from dark -vf mp to light -vf.
 Thou shalst not make spells or scripts that depend on it

 Program received signal SIGSEGV, Segmentation fault.
 0x0000000000464296 in convert_mask_to_strength_mask (vf=0x1481140,
 mask=0x148b310)
     at libavfilter/libmpcodecs/vf_remove_logo.c:384
 384                 *(current_pixel - mask->width) >= current_pass)
 (gdb) bt
 #0  0x0000000000464296 in convert_mask_to_strength_mask (vf=0x1481140,
 mask=0x148b310)
     at libavfilter/libmpcodecs/vf_remove_logo.c:384
 #1  0x00000000004655e1 in vf_open (vf=0x1481140, args=0x1521d6c
 "out0225.ppm")
     at libavfilter/libmpcodecs/vf_remove_logo.c:872
 #2  0x000000000042c4bb in init (ctx=0x1521e00, args=0x1521d6c
 "out0225.ppm", opaque=0x0)
     at libavfilter/vf_mp.c:780
 #3  0x0000000000420315 in avfilter_init_filter (filter=0x1521e00,
     args=0x1521d60 "remove-logo:out0225.ppm", opaque=0x0) at
 libavfilter/avfilter.c:712
 #4  0x0000000000422bb0 in create_filter (filt_ctx=0x7fffffffcf88,
 ctx=0x14aa5c0, index=0,
     filt_name=0x1521ce0 "mp", args=0x1521d60 "remove-logo:out0225.ppm",
 log_ctx=0x0)
     at libavfilter/graphparser.c:130
 #5  0x0000000000422c8d in parse_filter (filt_ctx=0x7fffffffcf88,
 buf=0x7fffffffcf60, graph=0x14aa5c0,
     index=0, log_ctx=0x0) at libavfilter/graphparser.c:165
 #6  0x0000000000423290 in avfilter_graph_parse (graph=0x14aa5c0,
 filters=0x14827fa "",
     open_inputs=0x15223a0, open_outputs=0x14808e0, log_ctx=0x0) at
 libavfilter/graphparser.c:347
 #7  0x000000000040596a in configure_video_filters (ist=0x14817c0,
 ost=0x147fde0) at ffmpeg.c:420
 #8  0x000000000040c684 in transcode (output_files=0xf08380,
 nb_output_files=1, input_files=0x1482580,
     nb_input_files=1, stream_maps=0x0, nb_stream_maps=0) at ffmpeg.c:2277
 #9  0x0000000000412ec3 in main (argc=7, argv=0x7fffffffddd8) at
 ffmpeg.c:4530
 (gdb) disass $pc-32 $pc+32
 Dump of assembler code from 0x464276 to 0x4642b6:
 0x0000000000464276 <convert_mask_to_strength_mask+209>: mov    %eax,%eax
 0x0000000000464278 <convert_mask_to_strength_mask+211>: add
 -0x20(%rbp),%rax
 0x000000000046427c <convert_mask_to_strength_mask+215>: movzbl (%rax),%eax
 0x000000000046427f <convert_mask_to_strength_mask+218>: movsbl %al,%eax
 0x0000000000464282 <convert_mask_to_strength_mask+221>: cmp
 -0x18(%rbp),%eax
 0x0000000000464285 <convert_mask_to_strength_mask+224>: jl     0x4642b8
 <convert_mask_to_strength_mask+275>
 0x0000000000464287 <convert_mask_to_strength_mask+226>: mov
 -0x38(%rbp),%rax
 0x000000000046428b <convert_mask_to_strength_mask+230>: mov    (%rax),%eax
 0x000000000046428d <convert_mask_to_strength_mask+232>: mov    %eax,%eax
 0x000000000046428f <convert_mask_to_strength_mask+234>: neg    %rax
 0x0000000000464292 <convert_mask_to_strength_mask+237>: add
 -0x20(%rbp),%rax
 0x0000000000464296 <convert_mask_to_strength_mask+241>: movzbl (%rax),%eax
 0x0000000000464299 <convert_mask_to_strength_mask+244>: movsbl %al,%eax
 0x000000000046429c <convert_mask_to_strength_mask+247>: cmp
 -0x18(%rbp),%eax
 0x000000000046429f <convert_mask_to_strength_mask+250>: jl     0x4642b8
 <convert_mask_to_strength_mask+275>
 0x00000000004642a1 <convert_mask_to_strength_mask+252>: mov
 -0x20(%rbp),%rax
 0x00000000004642a5 <convert_mask_to_strength_mask+256>: movzbl (%rax),%eax
 0x00000000004642a8 <convert_mask_to_strength_mask+259>: lea
 0x1(%rax),%edx
 0x00000000004642ab <convert_mask_to_strength_mask+262>: mov
 -0x20(%rbp),%rax
 0x00000000004642af <convert_mask_to_strength_mask+266>: mov    %dl,(%rax)
 0x00000000004642b1 <convert_mask_to_strength_mask+268>: movl
 $0x1,-0x14(%rbp)
 End of assembler dump.
 (gdb) info register
 rax            0x7ffff7f3bc11   140737353333777
 rbx            0x1521fd0        22159312
 rcx            0x240    576
 rdx            0x2      2
 rsi            0x148b310        21541648
 rdi            0x1481140        21500224
 rbp            0x7fffffffcb90   0x7fffffffcb90
 rsp            0x7fffffffcb88   0x7fffffffcb88
 r8             0x7ffff7fcd6f0   140737353930480
 r9             0x0      0
 r10            0x22     34
 r11            0x246    582
 r12            0x14aa5c0        21669312
 r13            0x7fffffffddd0   140737488346576
 r14            0x0      0
 r15            0x0      0
 rip            0x464296 0x464296 <convert_mask_to_strength_mask+241>
 eflags         0x10207  [ CF PF IF RF ]
 cs             0x33     51
 ss             0x2b     43
 ds             0x0      0
 es             0x0      0
 fs             0x0      0
 gs             0x0      0
 fctrl          0x37f    895
 fstat          0x0      0
 ftag           0xffff   65535
 fiseg          0x0      0
 fioff          0x0      0
 foseg          0x0      0
 fooff          0x0      0
 fop            0x0      0
 mxcsr          0x1fa0   [ PE IM DM ZM OM UM PM ]
 }}}

-- 
Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/249#comment:3>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list