[FFmpeg-trac] #7835(undetermined:new): crashes using crop with zscale

FFmpeg trac at avcodec.org
Mon Apr 8 15:09:55 EEST 2019


#7835: crashes using crop with zscale
-------------------------------------+-------------------------------------
             Reporter:  nicol        |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug: using crop filter sets x option(3rd opt) except for 0
 with zscale crushes.
 How to reproduce:
 {{{
 % ffmpeg -loglevel debug -v 99 -f lavfi -i testsrc2=s=640x360 -vf
 crop=320:180:16:0,zscale=160:-2 -vframes 1 -f null -
 ffmpeg version N-93542-gecdaa4b4fa
   built with gcc 8.2.1 (GCC) 20190212
   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
 fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
 libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame
 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
 --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
 libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
 --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
 --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-
 nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
   libavutil      56. 26.100 / 56. 26.100
   libavcodec     58. 48.101 / 58. 48.101
   libavformat    58. 27.100 / 58. 27.100
   libavdevice    58.  7.100 / 58.  7.100
   libavfilter     7. 48.100 /  7. 48.100
   libswscale      5.  4.100 /  5.  4.100
   libswresample   3.  4.100 /  3.  4.100
   libpostproc    55.  4.100 / 55.  4.100
 Splitting the commandline.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument 'debug'.
 Reading option '-v' ... matched as option 'v' (set logging level) with
 argument '99'.
 Reading option '-f' ... matched as option 'f' (force format) with argument
 'lavfi'.
 Reading option '-i' ... matched as input url with argument
 'testsrc2=s=640x360'.
 Reading option '-vf' ... matched as option 'vf' (set video filters) with
 argument 'crop=320:180:16:0,zscale=160:-2'.
 Reading option '-vframes' ... matched as option 'vframes' (set the number
 of video frames to output) with argument '1'.
 Reading option '-f' ... matched as option 'f' (force format) with argument
 'null'.
 Reading option '-' ... matched as output url.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option loglevel (set logging level) with argument debug.
 Applying option v (set logging level) with argument 99.
 Successfully parsed a group of options.
 Parsing a group of options: input url testsrc2=s=640x360.
 Applying option f (force format) with argument lavfi.
 Successfully parsed a group of options.
 Opening an input file: testsrc2=s=640x360.
 detected 4 logical cores
 [Parsed_testsrc2_0 @ 00000000003748c0] Setting 's' to value '640x360'
 [Parsed_testsrc2_0 @ 00000000003748c0] size:640x360 rate:25/1
 duration:-1.000000 sar:1/1
 [AVFilterGraph @ 0000000000374580] query_formats: 2 queried, 1 merged, 0
 already done, 0 delayed
 [lavfi @ 0000000000370900] All info found
 [lavfi @ 0000000000370900] stream 0: start_time: 0.000 duration:
 -368934881474191040.000
 [lavfi @ 0000000000370900] format: start_time: 0.000 duration:
 -9223372036854.775 bitrate=0 kb/s
 Input #0, lavfi, from 'testsrc2=s=640x360':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0, 1, 1/25: Video: rawvideo, 1 reference frame (I420 /
 0x30323449), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 0/1, 25 tbr, 25 tbn, 25
 tbc
 Successfully opened the file.
 Parsing a group of options: output url -.
 Applying option vf (set video filters) with argument
 crop=320:180:16:0,zscale=160:-2.
 Applying option vframes (set the number of video frames to output) with
 argument 1.
 Applying option f (force format) with argument null.
 Successfully parsed a group of options.
 Opening an output file: -.
 Successfully opened the file.
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> wrapped_avframe (native))
 Press [q] to stop, [?] for help
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
 [rawvideo @ 0000000002be4740] PACKET SIZE: 345600, STRIDE: 960
 [Parsed_crop_0 @ 0000000002be5f00] Setting 'out_w' to value '320'
 [Parsed_crop_0 @ 0000000002be5f00] Setting 'out_h' to value '180'
 [Parsed_crop_0 @ 0000000002be5f00] Setting 'x' to value '16'
 [Parsed_crop_0 @ 0000000002be5f00] Setting 'y' to value '0'
 [Parsed_zscale_1 @ 00000000003e61c0] Setting 'w' to value '160'
 [Parsed_zscale_1 @ 00000000003e61c0] Setting 'h' to value '-2'
 [graph 0 input from stream 0:0 @ 00000000003e62c0] Setting 'video_size' to
 value '640x360'
 [graph 0 input from stream 0:0 @ 00000000003e62c0] Setting 'pix_fmt' to
 value '0'
 [graph 0 input from stream 0:0 @ 00000000003e62c0] Setting 'time_base' to
 value '1/25'
 [graph 0 input from stream 0:0 @ 00000000003e62c0] Setting 'pixel_aspect'
 to value '1/1'
 [graph 0 input from stream 0:0 @ 00000000003e62c0] Setting 'sws_param' to
 value 'flags=2'
 [graph 0 input from stream 0:0 @ 00000000003e62c0] Setting 'frame_rate' to
 value '25/1'
 [graph 0 input from stream 0:0 @ 00000000003e62c0] w:640 h:360
 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
 [AVFilterGraph @ 00000000003d5300] query_formats: 4 queried, 3 merged, 0
 already done, 0 delayed
 [Parsed_crop_0 @ 0000000002be5f00] w:640 h:360 sar:1/1 -> w:320 h:180
 sar:1/1
 [Parsed_zscale_1 @ 00000000003e61c0] w:320 h:180 fmt:yuv420p sar:1/1 ->
 w:160 h:90 fmt:yuv420p sar:1/1
 [Parsed_crop_0 @ 0000000002be5f00] n:0 t:0.000000 pos:nan x:16 y:0 x+w:336
 y+h:180
 [Parsed_zscale_1 @ 00000000003e61c0] w:320 h:180 fmt:yuv420p sar:1/1 ->
 w:160 h:90 fmt:yuv420p sar:1/1
 built on ... zeranoe
 }}}

 but
 ffmpeg -loglevel debug -v 99 -f lavfi -i testsrc2=s=640x360 -vf
 crop=320:180:'''0''':0,zscale=160:-2 -vframes 1 -f null -
 ffmpeg -loglevel debug -v 99 -f lavfi -i testsrc2=s=640x360 -vf
 crop=320:180:16:0,'''scale'''=160:-2 -vframes 1 -f null -
 are no crushes.

 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7835>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list