Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2932 closed defect (fixed)

w64: fail to decode

Reported by: ami_stuff Owned by:
Priority: important Component: avformat
Version: git-master Keywords: w64 regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no


attached file created with sound forge have an embedded bmp image

decodes correctly with libsndfile

C:\>ffmpeg -i sample2.w64 -f null -
ffmpeg version N-55957-g21dc3a3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Sep  2 2013 02:43:35 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
  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-pthreads --enable-memalign-hack --enable-runtime-cpudetect --
enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lw
inmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapsh
ots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/sna
pshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --
enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-li
bvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-li
bopencore-amrwb --enable-libmp3lame --enable-libfreetype --enable-libvpx --disab
  libavutil      52. 43.100 / 52. 43.100
  libavcodec     55. 30.100 / 55. 30.100
  libavformat    55. 15.100 / 55. 15.100
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.102 /  3. 82.102
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
sample2.w64: Invalid data found when processing input

Change History (5)

comment:1 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedavformat
Keywords: w64 regression added
Priority: normalimportant
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Regression since 14d50c1.

comment:2 by Elon Musk, 10 years ago

Resolution: fixed
Status: openclosed

Fixed in 79b70e47a46305.

comment:3 by jamal, 10 years ago

The fix is wrong, or it at least is not a proper one.
What needs to be changed is the last avio_skip() from summarylist

avio_skip(pb, end - avio_tell(pb))


avio_skip(pb, end - avio_tell(pb) - 24)

Check the sample with an hex editor. The size for the summarylist chunk is reported as 200.
As things are right now (Commit 79b70e47a46305), after the avio_skip() from summarylist the next (and unknown) GUID is "0x08000000280000000004000000030000" with size 2097153, then after that one is skipped the next GUID is "0xede0d800e9ddd900ebdedc00ece0de00" with size 57641763956315878, which is of course nonsense.

If you add the "- 24" to summarylist's avio_skip(), the unknown GUID that comes after summarylist becomes "0x25ca2c61bb92554c84087bda2f15bd27" and the size 3145800, which after skipping the aviocontext will point exactly to EOF.
That single unknown GUID is the BMP file ami_stuff mentioned.

comment:4 by jamal, 10 years ago

Cc: added

comment:5 by Elon Musk, 10 years ago

Fixed, thanks for pointing it out.

Note: See TracTickets for help on using tickets.