avformat/avisynth: Don't insert null frames or samples at the start of a stream.
authorStephen Hutchinson <qyot27@gmail.com>
Wed, 10 Apr 2013 19:29:27 +0000 (15:29 -0400)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Apr 2013 14:32:14 +0000 (16:32 +0200)
This is the last remaining issue from ticket #2412

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/avisynth.c

index 775a5f2..a5a4fcc 100644 (file)
@@ -420,8 +420,8 @@ static int avisynth_read_packet_video(AVFormatContext *s, AVPacket *pkt, int dis
     if (discard)
         return 0;
 
-    pkt->pts = avs->curr_frame;
-    pkt->dts = avs->curr_frame;
+    pkt->pts = n;
+    pkt->dts = n;
     pkt->duration = 1;
 
     // Define the bpp values for the new AviSynth 2.6 colorspaces
@@ -516,8 +516,8 @@ static int avisynth_read_packet_audio(AVFormatContext *s, AVPacket *pkt, int dis
     if (discard)
         return 0;
 
-    pkt->pts = avs->curr_sample;
-    pkt->dts = avs->curr_sample;
+    pkt->pts = n;
+    pkt->dts = n;
     pkt->duration = samples;
 
     pkt->size = avs_bytes_per_channel_sample(avs->vi) * samples * avs->vi->nchannels;