[FFmpeg-trac] #122(FFplay:new): Kega Game Video codec broken with ffplay

FFmpeg trac at avcodec.org
Tue Apr 26 20:48:03 CEST 2011


#122: Kega Game Video codec broken with ffplay
----------------------+---------------------
  Reporter:  cehoyos  |      Owner:  michael
      Type:  defect   |     Status:  new
  Priority:  normal   |  Component:  FFplay
   Version:  git      |   Keywords:
Blocked By:           |   Blocking:
Reproduced:  0        |   Analyzed:  0
----------------------+---------------------
 The sample from ticket #59 plays badly with ffplay (and valgrind shows
 many invalid reads).
 {{{
 $ valgrind ./ffplay_g kgv1.avi
 ==13914== Memcheck, a memory error detector
 ==13914== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
 ==13914== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright
 info
 ==13914== Command: ./ffplay_g kgv1.avi
 ==13914==
 ffplay version git-N-29391-gd84f191, Copyright (c) 2003-2011 the FFmpeg
 developers
   built on Apr 26 2011 20:33:16 with gcc 4.5.2
   configuration: --cc='/usr/local/gcc-4.5.2/bin/gcc -m32' --enable-gpl
   libavutil    51.  0. 0 / 51.  0. 0
   libavcodec   53.  1. 0 / 53.  1. 0
   libavformat  53.  0. 3 / 53.  0. 3
   libavdevice  53.  0. 0 / 53.  0. 0
   libavfilter   2.  0. 0 /  2.  0. 0
   libswscale    0. 13. 0 /  0. 13. 0

 ...

 Input #0, avi, from 'kgv1.avi':
   Duration: 00:00:05.21, start: 0.000000, bitrate: 1633 kb/s
     Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
     Stream #0.1: Video: kgv1, rgb555le, 640x480, 60 tbr, 60 tbn, 60 tbc
 [ffsink @ 0xb8b7120] auto-inserting filter 'auto-inserted scaler 0'
 between the filter 'src' and the filter 'out'

 ...

 [scale @ 0xb8b7770] w:640 h:480 fmt:rgb555le -> w:640 h:480 fmt:yuv420p
 flags:0x4
 ==13914== Thread 5:
 ==13914== Invalid read of size 1
 ==13914==    at 0x644C138: memcpy (in
 /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so)
 ==13914==    by 0x85BC128: av_image_copy (imgutils.c:230)
 ==13914==  Address 0xd63c857 is 1 bytes before a block of size 153,600
 alloc'd
 ==13914==    at 0x644AC8C: malloc (in
 /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so)
 ==13914==    by 0x644AD16: realloc (in
 /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so)
 ==13914==    by 0x82E6684: decode_frame (kgv1dec.c:67)
 ==13914==
 ==13914== Invalid read of size 1
 ==13914==    at 0x644C142: memcpy (in
 /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so)
 ==13914==    by 0x85BC128: av_image_copy (imgutils.c:230)
 ==13914==  Address 0xd63c856 is 2 bytes before a block of size 153,600
 alloc'd
 ==13914==    at 0x644AC8C: malloc (in
 /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so)
 ==13914==    by 0x644AD16: realloc (in
 /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so)
 ==13914==    by 0x82E6684: decode_frame (kgv1dec.c:67)
 ==13914==
 ==13914== Invalid read of size 1
 ==13914==    at 0x644C14B: memcpy (in
 /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so)
 ==13914==    by 0x85BC128: av_image_copy (imgutils.c:230)
 ==13914==  Address 0xd63c855 is 3 bytes before a block of size 153,600
 alloc'd
 ==13914==    at 0x644AC8C: malloc (in
 /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so)
 ==13914==    by 0x644AD16: realloc (in
 /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so)
 ==13914==    by 0x82E6684: decode_frame (kgv1dec.c:67)
 ==13914==
 ==13914== Invalid read of size 1
 ==13914==    at 0x644C154: memcpy (in
 /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so)
 ==13914==    by 0x85BC128: av_image_copy (imgutils.c:230)
 ==13914==  Address 0xd63c854 is 4 bytes before a block of size 153,600
 alloc'd
 ==13914==    at 0x644AC8C: malloc (in
 /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so)
 ==13914==    by 0x644AD16: realloc (in
 /usr/lib64/valgrind/vgpreload_memcheck-x86-linux.so)
 ==13914==    by 0x82E6684: decode_frame (kgv1dec.c:67)
 ==13914==
 ==13914== Conditional jump or move depends on uninitialised value(s)
 ==13914==    at 0x85977BB: swScale_MMX2 (common.h:124)
 ==13914==
 ==13914== Conditional jump or move depends on uninitialised value(s)
 ==13914==    at 0x8597894: swScale_MMX2 (common.h:124)
 ==13914==
 ==13914== Conditional jump or move depends on uninitialised value(s)
 ==13914==    at 0x85978B2: swScale_MMX2 (common.h:124)

 ...
 }}}

-- 
Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/122>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list