#2569 closed defect (fixed)
mszh: crash with yuv421
| Reported by: | ami_stuff | Owned by: | |
|---|---|---|---|
| Priority: | important | Component: | avcodec |
| Version: | git-master | Keywords: | regression |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | no |
Description
attached file crashes ffmpeg here at the end of conversion (but I can't reproduce the crash under gdb)
maybe invalid read?
C:\>ffmpeg -i yuv421.avi out.avi
ffmpeg version N-53032-g37d9784 Copyright (c) 2000-2013 the FFmpeg developers
built on May 14 2013 02:45:02 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
0-1.fc14)
configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-gcc' --enable-w32threads --enable-memalign-hack --enable-runtime-cpudetect
--enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -
lwinmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snap
shots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/s
napshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3
--enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-
libvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
libavutil 52. 31.100 / 52. 31.100
libavcodec 55. 9.100 / 55. 9.100
libavformat 55. 7.100 / 55. 7.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 65.100 / 3. 65.100
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Input #0, avi, from 'yuv421.avi':
Duration: 00:00:00.10, start: 0.000000, bitrate: 128029 kb/s
Stream #0:0: Video: mszh (MSZH / 0x485A534D), yuv422p, 1022x768, 10 tbr, 10
tbn, 10 tbc
Output #0, avi, to 'out.avi':
Metadata:
ISFT : Lavf55.7.100
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1022x768, q=2-31, 20
0 kb/s, 10 tbn, 10 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mszh -> mpeg4)
Press [q] to stop, [?] for help
frame= 1 fps=0.0 q=6.7 Lsize= 65kB time=00:00:00.10 bitrate=5348.2kbits/
s
video:60kB audio:0kB subtitle:0 global headers:0kB muxing overhead 9.333551%
Attachments (1)
Change History (10)
by , 13 years ago
| Attachment: | yuv421.avi added |
|---|
follow-up: 2 comment:1 by , 13 years ago
| Keywords: | mszh added |
|---|
follow-up: 3 comment:2 by , 13 years ago
Replying to cehoyos:
No invalid memory access here.
Does the crash also happen with a Zeranoe binary?
It doesn't. Maybe the problem have something to do with w32threads then?
comment:3 by , 13 years ago
Replying to ami_stuff:
Maybe the problem have something to do with w32threads then?
Does the crash disappear if you compile with --disable-w32threads?
follow-up: 5 comment:4 by , 13 years ago
Please try to reproduce with
ffmpeg -cpuflags -mmx -i yuv421.avi out.avi
(32bit build)
comment:5 by , 13 years ago
Replying to ami_stuff:
Please try to reproduce with
ffmpeg -cpuflags -mmx -i yuv421.avi out.avi
It does crash with -cpuflags -mmx here (too) but my CPU is not MMX-only, it has other features that are not automatically disabled by -cpuflags -mmx, the following command line works fine here (and there is no hardware that supports SSE2, SSSE3 or SSE4.1 but not MMX):
$ ffmpeg -cpuflags -mmx-sse2-ssse3-sse4.1 -i yuv421.avi out.avi
(32bit build)
Same behaviour with 32bit and 64bit here.
comment:6 by , 13 years ago
on my old athlon xp it crashed without -cpuflags option*, I can't test it there anymore
- at least with one build
comment:7 by , 13 years ago
The question is if it works on the Athlon with -cpuflags -3dnow-3dnowext
comment:8 by , 13 years ago
| Component: | undetermined → avcodec |
|---|---|
| Keywords: | regression added; mszh removed |
| Priority: | normal → important |
| Reproduced by developer: | set |
| Resolution: | → fixed |
| Status: | new → closed |
| Version: | unspecified → git-master |
$ valgrind ./ffmpeg_g -i yuv421.avi out.avi
==11331== Memcheck, a memory error detector.
==11331== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==11331== Using LibVEX rev 1854, a library for dynamic binary translation.
==11331== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==11331== Using valgrind-3.3.1, a dynamic binary instrumentation framework.
==11331== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==11331== For more details, rerun with: -v
==11331==
ffmpeg version N-53956-g57655c6 Copyright (c) 2000-2013 the FFmpeg developers
built on Jun 22 2013 14:18:10 with gcc 4.3.4 (GCC)
configuration: --disable-optimizations --cc=/usr/local/gcc-4.3.4/bin/gcc
libavutil 52. 35.100 / 52. 35.100
libavcodec 55. 15.100 / 55. 15.100
libavformat 55. 8.102 / 55. 8.102
libavdevice 55. 2.100 / 55. 2.100
libavfilter 3. 75.101 / 3. 75.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
Input #0, avi, from 'yuv421.avi':
Duration: 00:00:00.10, start: 0.000000, bitrate: 128029 kb/s
Stream #0:0: Video: mszh (MSZH / 0x485A534D), yuv422p, 1022x768, 10 tbr, 10 tbn, 10 tbc
Output #0, avi, to 'out.avi':
Metadata:
ISFT : Lavf55.8.102
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1022x768, q=2-31, 200 kb/s, 10 tbn, 10 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mszh -> mpeg4)
Press [q] to stop, [?] for help
==11331== Invalid write of size 8
==11331== at 0x87072F0: ff_draw_edges_mmx (dsputil_mmx.c:389)
==11331== by 0x85172B0: load_input_picture (mpegvideo_enc.c:1063)
==11331== by 0x85188ED: ff_MPV_encode_picture (mpegvideo_enc.c:1448)
==11331== by 0x861FC24: avcodec_encode_video2 (utils.c:1762)
==11331== by 0x805C37E: do_video_out (ffmpeg.c:947)
==11331== by 0x805CEAF: reap_filters (ffmpeg.c:1091)
==11331== by 0x8066979: transcode_step (ffmpeg.c:3162)
==11331== by 0x8066A3A: transcode (ffmpeg.c:3205)
==11331== by 0x8066F4E: main (ffmpeg.c:3383)
==11331== Address 0x50add50 is 0 bytes after a block of size 211,216 alloc'd
==11331== at 0x4025CFA: memalign (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==11331== by 0x4025DAE: posix_memalign (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==11331== by 0x89245B3: av_malloc (mem.c:93)
==11331== by 0x8917F7A: av_buffer_alloc (buffer.c:70)
==11331== by 0x8917FE7: av_buffer_allocz (buffer.c:83)
==11331== by 0x89185E6: pool_alloc_buffer (buffer.c:305)
==11331== by 0x8918734: av_buffer_pool_get (buffer.c:343)
==11331== by 0x861BE59: video_get_buffer (utils.c:550)
==11331== by 0x861C1E6: avcodec_default_get_buffer2 (utils.c:615)
==11331== by 0x861CB61: get_buffer_internal (utils.c:830)
==11331== by 0x861CBB9: ff_get_buffer (utils.c:842)
==11331== by 0x85740BE: thread_get_buffer_internal (pthread.c:929)
frame= 1 fps=0.3 q=6.7 Lsize= 65kB time=00:00:00.10 bitrate=5348.2kbits/s
video:60kB audio:0kB subtitle:0 global headers:0kB muxing overhead 9.331763%
==11331==
==11331== ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 3 from 1)
==11331== malloc/free: in use at exit: 0 bytes in 0 blocks.
==11331== malloc/free: 2,732 allocs, 2,732 frees, 22,946,183 bytes allocated.
==11331== For counts of detected errors, rerun with: -v
==11331== All heap blocks were freed -- no leaks are possible.



No invalid memory access here.
Does the crash also happen with a Zeranoe binary?