Opened 12 years ago

Closed 12 years ago

#1506 closed defect (fixed)

sgi fails to decode

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

Description

http://www.datafilehost.com/download-a959c795.html

attached file fails to decode with ffmpeg because of this check in "libavcodec/sgidec.c":

    for (z = 0; z < s->depth; z++) {
        dest_row = out_buf;
        for (y = 0; y < s->height; y++) {
            dest_row -= s->linesize;
            start_offset = bytestream2_get_be32(&g_table);
            bytestream2_seek(&s->g, start_offset, SEEK_SET);
            if (expand_rle_row(s, dest_row + z, dest_row + FFABS(s->linesize),
                          s->depth) != s->width) {
           //  return AVERROR_INVALIDDATA;
            }
        }
    }

decodes correctly with every image viewer I have tested.

C:\>ffmpeg -i Test-2.sgi out.bmp
ffmpeg version N-42089-g64b2593 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jul  1 2012 02:22:20 with gcc 4.5.0 20100414 (Fedora MinGW 4.5.0-1.fc
14)
  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      51. 63.100 / 51. 63.100
  libavcodec     54. 31.100 / 54. 31.100
  libavformat    54. 14.100 / 54. 14.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     3.  0.100 /  3.  0.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, image2, from 'Test-2.sgi':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: sgi, rgb24, 1024x768, 25 tbr, 25 tbn, 25 tbc
[graph 0 input from stream 0:0 @ 0x1e21440] w:1024 h:768 pixfmt:rgb24 tb:1/25 fr
:25/1 sar:0/1 sws_param:flags=2
[output stream 0:0 @ 0x1e22c80] No opaque field provided
[auto-inserted scaler 0 @ 0x1e22500] w:1024 h:768 fmt:rgb24 sar:0/1 -> w:1024 h:
768 fmt:bgr24 sar:0/1 flags:0x4
Output #0, image2, to 'out.bmp':
  Metadata:
    encoder         : Lavf54.14.100
    Stream #0:0: Video: bmp, bgr24, 1024x768, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (sgi -> bmp)
Press [q] to stop, [?] for help
Error while decoding stream #0:0: Invalid data found when processing input
frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=   0.0kbits/
s
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters i
f used)

Attachments (1)

Test-2.sgi (2.3 MB ) - added by Carl Eugen Hoyos 12 years ago.

Change History (3)

comment:1 by Carl Eugen Hoyos, 12 years ago

Component: undeterminedavcodec
Keywords: sgi added
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

by Carl Eugen Hoyos, 12 years ago

Attachment: Test-2.sgi added

comment:2 by Michael Niedermayer, 12 years ago

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