[FFmpeg-trac] #958(undetermined:open): matroska seek problem file (3 bugs)

FFmpeg trac at avcodec.org
Sun Feb 12 19:28:41 CET 2012


#958: matroska seek problem file (3 bugs)
-------------------------------------+-------------------------------------
             Reporter:  DonMoir      |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:  mkv h264     |               Resolution:
  seek                               |               Blocked By:
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by DonMoir):

 Don't depend on any output messages etc. It only gets a read error at the
 very end of the file.

 If you trace into the code on a first seek and set a break point, you
 should see it fail. It's failing because total = avio_r8(pb) is zero. Why
 this is zero for this file I do not know. It can create the index table if
 you let this pass but what other ramifications that might have I don't
 know.


 {{{
 static int ebml_read_num(MatroskaDemuxContext *matroska, AVIOContext *pb,
                          int max_size, uint64_t *number)
 {
     int read = 1, n = 1;
     uint64_t total = 0;

     ....

     /* The first byte tells us the length in bytes - avio_r8() can
 normally
      * return 0, but since that's not a valid first ebmlID byte, we can
      * use it safely here to catch EOS. */
 //******************************************
 // SET BREAK POINT on following if statement
     if (!(total = avio_r8(pb))) {
         /* we might encounter EOS here */
         if (!url_feof(pb)) {
             int64_t pos = avio_tell(pb);
             av_log(matroska->ctx, AV_LOG_ERROR,
                    "Read error at pos. %"PRIu64" (0x%"PRIx64")\n",
                    pos, pos);
         }
         return AVERROR(EIO); /* EOS or actual I/O error */
     }
     ....
 }
 }}}

 So trace directly into the code and don't depend on anything else.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/958#comment:4>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list