[FFmpeg-trac] #4086(avformat:open): Decoding of a 20 minutes dvvideo / avi sample stops around 4:56 minutes.

FFmpeg trac at avcodec.org
Fri Nov 7 15:57:01 CET 2014


#4086: Decoding of a 20 minutes dvvideo / avi sample stops around 4:56 minutes.
-------------------------------------+-------------------------------------
             Reporter:  naciselim    |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  important    |                Component:  avformat
              Version:  git-master   |               Resolution:
             Keywords:  dvvideo avi  |               Blocked By:
  regression                         |  Reproduced by developer:  1
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by naciselim):

 Yes, thanks, I did this change and the video worked. However, I did some
 extra changes also. Please let me know if they were needed or harm in a
 way:


 {{{
 $ diff -C 5 avidec.c.orig avidec.c
 *** avidec.c.orig       2014-11-06 23:25:43.827512100 -0800
 --- avidec.c    2014-11-06 23:31:47.626320200 -0800
 ***************
 *** 1148,1158 ****
           if (d[0] == 'L' && d[1] == 'I' && d[2] == 'S' && d[3] == 'T') {
               avio_skip(pb, 4);
               goto start_sync;
           }

 !         n = avi->dv_demux ? 0 : get_stream_idx(d);

           if (!((i - avi->last_pkt_pos) & 1) &&
               get_stream_idx(d + 1) < s->nb_streams)
               continue;

 --- 1148,1159 ----
           if (d[0] == 'L' && d[1] == 'I' && d[2] == 'S' && d[3] == 'T') {
               avio_skip(pb, 4);
               goto start_sync;
           }

 !         // n = avi->dv_demux ? 0 : get_stream_idx(d);
 !       n = get_stream_idx(d);

           if (!((i - avi->last_pkt_pos) & 1) &&
               get_stream_idx(d + 1) < s->nb_streams)
               continue;

 ***************
 *** 1720,1735 ****
       AVStream *st;
       int i, index;
       int64_t pos, pos_min;
       AVIStream *ast;

 -     /* Does not matter which stream is requested dv in avi has the
 -      * stream information in the first video stream.
 -      */
 -     if (avi->dv_demux)
 -         stream_index = 0;
 -
       if (!avi->index_loaded) {
           /* we only load the index on demand */
           avi_load_index(s);
           avi->index_loaded |= 1;
       }
 --- 1721,1730 ----
 ***************
 *** 1758,1768 ****

       if (CONFIG_DV_DEMUXER && avi->dv_demux) {
           /* One and only one real stream for DV in AVI, and it has video
 */
           /* offsets. Calling with other stream indexes should have failed
 */
           /* the av_index_search_timestamp call above.
 */
 !
           if (avio_seek(s->pb, pos, SEEK_SET) < 0)
               return -1;

           /* Feed the DV video stream version of the timestamp to the */
           /* DV demux so it can synthesize correct timestamps.        */
 --- 1753,1764 ----

       if (CONFIG_DV_DEMUXER && avi->dv_demux) {
           /* One and only one real stream for DV in AVI, and it has video
 */
           /* offsets. Calling with other stream indexes should have failed
 */
           /* the av_index_search_timestamp call above.
 */
 !         av_assert0(stream_index == 0);
 !
           if (avio_seek(s->pb, pos, SEEK_SET) < 0)
               return -1;

           /* Feed the DV video stream version of the timestamp to the */
           /* DV demux so it can synthesize correct timestamps.        */

 tt at NaciTT ~/ffmpeg/libavformat
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4086#comment:10>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list