Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#2648 closed defect (fixed)

tiff: planar lzw decodes incorrectly

Reported by: ami_stuff Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: tif
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

attached file decodes incorrectly

C:\>ffmpeg -i per_channel_lzw.tif out.bmp
ffmpeg version N-53865-gb28851a Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun  6 2013 02:42:29 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. 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
  libpostproc    52.  3.100 / 52.  3.100
Input #0, image2, from 'per_channel_lzw.tif':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: tiff, gbrp, 1024x768, 25 tbr, 25 tbn, 25 tbc
Output #0, image2, to 'out.bmp':
  Metadata:
    encoder         : Lavf55.8.102
    Stream #0:0: Video: bmp, bgr24, 1024x768, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (tiff -> bmp)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=-1.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
video:2304kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.000932
%

Attachments (1)

per_channel_lzw.tif (1.6 MB) - added by ami_stuff 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by ami_stuff

comment:1 Changed 4 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords tif added
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

Crashes ffplay and valgrind here (similar with --disable-pthreads), no backtrace.

$ valgrind ffplay_g -threads 1 per_channel_lzw.tif
==7617== Memcheck, a memory error detector
==7617== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==7617== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==7617== Command:ffplay_g -threads 1 per_channel_lzw.tif
==7617==
ffplay version N-53878-g00f4998 Copyright (c) 2003-2013 the FFmpeg developers
  built on Jun  6 2013 21:28:03 with gcc 4.7 (SUSE Linux)
  configuration: --disable-optimizations --disable-asm
  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, image2, from 'per_channel_lzw.tif': 0KB sq=    0B f=0/0
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
    Stream #0:0: Video: tiff, gbrp, 1024x768, 25 tbr, 25 tbn, 25 tbc
==7617== Thread 5:n fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
==7617== Invalid read of size 1
==7617==    at 0xA1D5BF: decode_frame (tiff.c:1199)
==7617==    by 0xA3CC4C: avcodec_decode_video2 (utils.c:1951)
==7617==    by 0x40BCEA: get_video_frame (ffplay.c:1689)
==7617==    by 0x40CA8C: video_thread (ffplay.c:1923)
==7617==    by 0x5CCDE95: ??? (in /usr/lib64/libSDL-1.2.so.0.11.4)
==7617==    by 0x5D10CD8: ??? (in /usr/lib64/libSDL-1.2.so.0.11.4)
==7617==    by 0x5F5EE0D: start_thread (in /lib64/libpthread-2.15.so)
==7617==    by 0x6B7B2CC: clone (in /lib64/libc-2.15.so)
==7617==  Address 0xa13a1f0 is 0 bytes after a block of size 786,448 alloc'd
==7617==    at 0x4C290FE: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7617==    by 0x4C291A7: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7617==    by 0xCE9D7D: av_malloc (mem.c:93)
==7617==    by 0xCDC9FC: av_buffer_alloc (buffer.c:70)
==7617==    by 0xCDCA61: av_buffer_allocz (buffer.c:83)
==7617==    by 0xCDD0F1: pool_alloc_buffer (buffer.c:305)
==7617==    by 0xCDD265: av_buffer_pool_get (buffer.c:343)
==7617==    by 0xA386C8: video_get_buffer (utils.c:550)
==7617==    by 0xA38ADD: avcodec_default_get_buffer2 (utils.c:615)
==7617==    by 0xA3946E: get_buffer_internal (utils.c:830)
==7617==    by 0xA394D1: ff_get_buffer (utils.c:842)
==7617==    by 0xA19B9B: init_image (tiff.c:662)
==7617==
==7617== Invalid write of size 1
==7617==    at 0xA1D5D6: decode_frame (tiff.c:1199)
==7617==    by 0xA3CC4C: avcodec_decode_video2 (utils.c:1951)
==7617==    by 0x40BCEA: get_video_frame (ffplay.c:1689)
==7617==    by 0x40CA8C: video_thread (ffplay.c:1923)
==7617==    by 0x5CCDE95: ??? (in /usr/lib64/libSDL-1.2.so.0.11.4)
==7617==    by 0x5D10CD8: ??? (in /usr/lib64/libSDL-1.2.so.0.11.4)
==7617==    by 0x5F5EE0D: start_thread (in /lib64/libpthread-2.15.so)
==7617==    by 0x6B7B2CC: clone (in /lib64/libc-2.15.so)
==7617==  Address 0xa13a1f0 is 0 bytes after a block of size 786,448 alloc'd
==7617==    at 0x4C290FE: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7617==    by 0x4C291A7: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7617==    by 0xCE9D7D: av_malloc (mem.c:93)
==7617==    by 0xCDC9FC: av_buffer_alloc (buffer.c:70)
==7617==    by 0xCDCA61: av_buffer_allocz (buffer.c:83)
==7617==    by 0xCDD0F1: pool_alloc_buffer (buffer.c:305)
==7617==    by 0xCDD265: av_buffer_pool_get (buffer.c:343)
==7617==    by 0xA386C8: video_get_buffer (utils.c:550)
==7617==    by 0xA38ADD: avcodec_default_get_buffer2 (utils.c:615)
==7617==    by 0xA3946E: get_buffer_internal (utils.c:830)
==7617==    by 0xA394D1: ff_get_buffer (utils.c:842)
==7617==    by 0xA19B9B: init_image (tiff.c:662)
==7617==
==7617== Invalid read of size 1
==7617==    at 0xA1D5D1: decode_frame (tiff.c:1199)
==7617==    by 0xA3CC4C: avcodec_decode_video2 (utils.c:1951)
==7617==    by 0x40BCEA: get_video_frame (ffplay.c:1689)
==7617==    by 0x40CA8C: video_thread (ffplay.c:1923)
==7617==    by 0x5CCDE95: ??? (in /usr/lib64/libSDL-1.2.so.0.11.4)
==7617==    by 0x5D10CD8: ??? (in /usr/lib64/libSDL-1.2.so.0.11.4)
==7617==    by 0x5F5EE0D: start_thread (in /lib64/libpthread-2.15.so)
==7617==    by 0x6B7B2CC: clone (in /lib64/libc-2.15.so)
==7617==  Address 0xa13a1f0 is 0 bytes after a block of size 786,448 alloc'd
==7617==    at 0x4C290FE: memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7617==    by 0x4C291A7: posix_memalign (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7617==    by 0xCE9D7D: av_malloc (mem.c:93)
==7617==    by 0xCDC9FC: av_buffer_alloc (buffer.c:70)
==7617==    by 0xCDCA61: av_buffer_allocz (buffer.c:83)
==7617==    by 0xCDD0F1: pool_alloc_buffer (buffer.c:305)
==7617==    by 0xCDD265: av_buffer_pool_get (buffer.c:343)
==7617==    by 0xA386C8: video_get_buffer (utils.c:550)
==7617==    by 0xA38ADD: avcodec_default_get_buffer2 (utils.c:615)
==7617==    by 0xA3946E: get_buffer_internal (utils.c:830)
==7617==    by 0xA394D1: ff_get_buffer (utils.c:842)
==7617==    by 0xA19B9B: init_image (tiff.c:662)
==7617==
--7617-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting
--7617-- si_code=80;  Faulting address: 0x0;  sp: 0x406539db0

comment:2 Changed 4 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

Fixed by Paul B Mahol.

Note: See TracTickets for help on using tickets.