[FFmpeg-trac] #3935(avformat:new): srtdec fails to probe files whose first event ID is not 1 or 0

FFmpeg trac at avcodec.org
Tue Sep 9 08:03:55 CEST 2014


#3935: srtdec fails to probe files whose first event ID is not 1 or 0
----------------------------------+--------------------------------------
             Reporter:  11rcombs  |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avformat  |                  Version:  git-master
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+--------------------------------------
 Summary of the bug:
 Some SRT files in the wild don't start with 0 or 1. These files are
 currently not probed by srtdec, because it expects the first item in the
 file to atoi() to 0 or 1. Amusingly enough, the probe returns
 AVPROBE_SCORE_MAX if there's no event ID at all, but the first event
 starts at a time <2 hours.
 How to reproduce:
 {{{
 $ ffmpeg -i test.srt -f srt -
 ffmpeg version N-66154-g1654ca7 Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Sep  5 2014 23:23:09 with Apple LLVM version 6.0
 (clang-600.0.34.4) (based on LLVM 3.5svn)
   configuration: --extra-cflags='-march=native' --enable-optimizations
 --disable-stripping --enable-debug --enable-libx265 --enable-gpl --enable-
 libopus --enable-version3 --enable-nonfree --enable-postproc --enable-
 libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame
 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-gnutls --enable-libtheora --enable-libvorbis --enable-libvpx
 --enable-libx264 --enable-libxvid --prefix=/usr/local --enable-static
 --enable-shared --enable-avresample --enable-vda --enable-opencl --enable-
 libzvbi --cc=clang
   libavutil      54.  7.100 / 54.  7.100
   libavcodec     56.  1.100 / 56.  1.100
   libavformat    56.  4.100 / 56.  4.100
   libavdevice    56.  0.100 / 56.  0.100
   libavfilter     5.  1.100 /  5.  1.100
   libavresample   2.  1.  0 /  2.  1.  0
   libswscale      3.  0.100 /  3.  0.100
   libswresample   1.  1.100 /  1.  1.100
   libpostproc    53.  0.100 / 53.  0.100
 test.srt: Invalid data found when processing input
 }}}

 Example file content:
 {{{
 3
 00:00:00,000 --> 00:00:05,000
 TEST1

 4
 00:00:05,100 --> 00:00:05,250
 TEST2

 5
 00:00:05,500 --> 00:08:47,307
 TEST3

 }}}

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


More information about the FFmpeg-trac mailing list