changeset 3488:222810cefa11 libavformat

do not reset ffm pts, this avoids setting last pts to 0 and screwing up seeking
author bcoudurier
date Sun, 22 Jun 2008 00:26:25 +0000
parents 2f191d610db9
children e9876fb1c84f
files ffmenc.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ffmenc.c	Fri Jun 20 17:22:56 2008 +0000
+++ b/ffmenc.c	Sun Jun 22 00:26:25 2008 +0000
@@ -47,7 +47,6 @@
 
     /* prepare next packet */
     ffm->frame_offset = 0; /* no key frame */
-    ffm->pts = 0; /* no pts */
     ffm->packet_ptr = ffm->packet;
     ffm->first_packet = 0;
 }
@@ -60,10 +59,10 @@
     FFMContext *ffm = s->priv_data;
     int len;
 
-    if (header && ffm->frame_offset == 0)
+    if (header && ffm->frame_offset == 0) {
         ffm->frame_offset = ffm->packet_ptr - ffm->packet + FFM_HEADER_SIZE;
-    if (header && ffm->pts == 0)
         ffm->pts = pts;
+    }
 
     /* write as many packets as needed */
     while (size > 0) {