Opened 6 years ago

Closed 6 years ago

#7263 closed defect (fixed)

dnxhd and interlaced encoding lead to a Segmentation fault

Reported by: NNois Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: dnxhd crash regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Hi,
Tested on windows 4.x builds
If I add the Interlaced options (filter_complex "setfield=tff" -flags +ildct) or using simple "-vf" formatting.
I have a Segmentation fault

If i switch for example to the prores_ks codec everything is fine

 10452 Segmentation fault
ffmpeg -y -stream_loop 0 -framerate 25 -i //192.168.1.53/jobs/gene_%05d.tga -i //192.168.1.53/jobs/gene.wav -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a pcm_s16le -shortest -filter_complex "setfield=tff" -flags +ildct //192.168.1.53/jobs/gene__180618_v1_@25i_dnx@dnxhr_hq.mxf

Change History (4)

comment:1 by NNois, 6 years ago

confirmed on ffmpeg 3.4.2 too

comment:2 by Carl Eugen Hoyos, 6 years ago

Component: undeterminedavcodec
Keywords: dnxhd crash regression added
Reproduced by developer: set
Version: unspecifiedgit-master

For future tickets: Please remember to always provide the command line you tested together with the complete, uncut console output, for crash reports, backtrace, disassembly and register dump or valgrind output are also welcome.
Reproducible since ece12db4f1a57d453c33cdd3baf64478034dab42

$ valgrind ./ffmpeg_g -f lavfi -i testsrc -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -flags +ildct -f null -threads 1 -
==7221== Memcheck, a memory error detector
==7221== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==7221== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==7221== Command: ./ffmpeg_g -f lavfi -i testsrc -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -flags +ildct -f null -threads 1 -
==7221==
ffmpeg version N-91329-g830695b Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.4.0 (GCC)
  configuration: --enable-gpl
  libavutil      56. 18.102 / 56. 18.102
  libavcodec     58. 20.103 / 58. 20.103
  libavformat    58. 17.100 / 58. 17.100
  libavdevice    58.  4.101 / 58.  4.101
  libavfilter     7. 25.100 /  7. 25.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
Input #0, lavfi, from 'testsrc':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> dnxhd (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf58.17.100
    Stream #0:0: Video: dnxhd (DNXHR HQ) (AVdh / 0x68645641), yuv422p, 320x240 [SAR 1:1 DAR 4:3], q=2-1024, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.20.103 dnxhd
==7221== Invalid write of size 4
==7221==    at 0x80BED7: dnxhd_encode_thread (put_bits.h:197)
==7221==    by 0xB0ECAF: avcodec_default_execute2 (utils.c:449)
==7221==    by 0x80A6A4: dnxhd_encode_picture (dnxhdenc.c:1320)
==7221==    by 0x8361A7: do_encode (encode.c:300)
==7221==    by 0x83685E: avcodec_send_frame (encode.c:417)
==7221==    by 0x49C8AD: do_video_out (ffmpeg.c:1292)
==7221==    by 0x49DB85: reap_filters (ffmpeg.c:1510)
==7221==    by 0x4A1CB7: transcode (ffmpeg.c:4613)
==7221==    by 0x480332: main (ffmpeg.c:4864)
==7221==  Address 0x7e853a4 is 0 bytes after a block of size 34,916 alloc'd
==7221==    at 0x4C290FE: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7221==    by 0x4C291A7: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7221==    by 0x10E1B5F: av_mallocz (mem.c:87)
==7221==    by 0xB0E09F: av_fast_padded_malloc (mem_internal.h:38)
==7221==    by 0x8358B7: ff_alloc_packet2 (encode.c:47)
==7221==    by 0x809E06: dnxhd_encode_picture (dnxhdenc.c:1286)
==7221==    by 0x8361A7: do_encode (encode.c:300)
==7221==    by 0x83685E: avcodec_send_frame (encode.c:417)
==7221==    by 0x49C8AD: do_video_out (ffmpeg.c:1292)
==7221==    by 0x49DB85: reap_filters (ffmpeg.c:1510)
==7221==    by 0x4A1CB7: transcode (ffmpeg.c:4613)
==7221==    by 0x480332: main (ffmpeg.c:4864)

comment:3 by Carl Eugen Hoyos, 6 years ago

Priority: normalimportant
Status: newopen

comment:4 by Carl Eugen Hoyos, 6 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.