[SCM] libav/experimental: The NSV demuxer assumes that a video frame's timestamp increases by one on each frame, but some low-bitrate NSV files omit video frames for some NSV frames, and expect the timestamp to increase by one every NSV frame. This is noticeable in 64vp3.nsv where the video runs several times faster than the audio. Fix this by unconditionally incrementing the video's timestamp with each NSV frame. patch by David Conrad, umovimus gmail com

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:58:03 UTC 2013


The following commit has been merged in the experimental branch:
commit 8076609a40ebf19541b52fe47a882c5ddd0fcb7c
Author: David Conrad <lessen42 at gmail.com>
Date:   Wed Mar 21 11:05:35 2007 +0000

    The NSV demuxer assumes that a video frame's timestamp increases by one on each
    frame, but some low-bitrate NSV files omit video frames for some NSV frames,
    and expect the timestamp to increase by one every NSV frame. This is noticeable
    in 64vp3.nsv where the video runs several times faster than the audio. Fix this
    by unconditionally incrementing the video's timestamp with each NSV frame.
    patch by David Conrad, umovimus gmail com
    
    Originally committed as revision 8466 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index af07ccf..2753edb 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -602,13 +602,15 @@ null_chunk_retry:
         pkt = &nsv->ahead[NSV_ST_VIDEO];
         av_get_packet(pb, pkt, vsize);
         pkt->stream_index = st[NSV_ST_VIDEO]->index;//NSV_ST_VIDEO;
-        pkt->dts = nst->frame_offset++;
+        pkt->dts = nst->frame_offset;
         pkt->flags |= nsv->state == NSV_HAS_READ_NSVS ? PKT_FLAG_KEY : 0; /* keyframe only likely on a sync frame */
 /*
         for (i = 0; i < MIN(8, vsize); i++)
             PRINT(("NSV video: [%d] = %02x\n", i, pkt->data[i]));
 */
     }
+    ((NSVStream*)st[NSV_ST_VIDEO]->priv_data)->frame_offset++;
+
     if (asize/*st[NSV_ST_AUDIO]*/) {
         nst = st[NSV_ST_AUDIO]->priv_data;
         pkt = &nsv->ahead[NSV_ST_AUDIO];

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list