[Ffmpeg-devel] VCD Bug Revisited

Colin Ward hitman
Wed Feb 8 15:30:13 CET 2006


  Hi all.

  Last week I reported a problem with a VCD .dat file that was not being
recognised by FFMPEG.  It turned out that it was a straight MPEG file that
had about 70k or blank zeros at the start.  I hacked
libavformat/utils.c::av_open_input_file() and
libavformat/mpeg.c::mpegps_probe() and got it working.

  Tonight I updated to CVS head and noticed that some kind soul has updated
to properly allocate memory and keep scanning more of the start of a file
until it can determine the file's type.  Very nice.  However, the file is
still not recognised because libavformat/mpeg.c::mpegps_probe() is only
scanning the first 20 bytes of the file.  Take a look at line 1266 of
mpegps_probe() and you will see that it always says int size= FFMIN(20,
p->buf_size); This means that it is always ignoring the large p->buf_size
that is passed in and scanning just the first 20 bytes.  Changing the FFMIN
to FFMAX causes it to detect the MPEG file correctly.

  Undernead this there is the following comment:

  /* NOTE: the search range was restricted to avoid too many false
     detections */

  Can anyone shed more light on this?

-- 
/-------------------------------------------------------------------\
[Hitman/Code HQ - 6502/z80/68000/604e/80x86/ARM coder - Amiga rulez!]
[VZ-200/VIC-20/MZ-700/c16/c64*10/c128*8/Plus-4/CPC464/CD32/500*2    ]
[600/1000/1200*2/A4000/SNES/N64/Dreamcast/Athlon 1100/AmigaOne      ]
[Assembly Language: The most fun you can have with your clothes on! ]
\-------------------------------------------------------------------/





More information about the ffmpeg-devel mailing list