changeset 1915:b3a5ffd3bc99 libavformat

set pkt->duration for laced packets too
author aurel
date Tue, 13 Mar 2007 00:16:31 +0000
parents 511723932287
children 6a5bafd079fd
files matroska.c
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/matroska.c	Tue Mar 13 00:10:52 2007 +0000
+++ b/matroska.c	Tue Mar 13 00:16:31 2007 +0000
@@ -2593,6 +2593,7 @@
 
                 pkt->pts = timecode;
                 pkt->pos = pos;
+                pkt->duration = duration;
 
                 if (matroska->tracks[track]->flags & MATROSKA_TRACK_REORDER)
                     matroska_queue_packet_reordered(matroska, pkt, is_bframe);
@@ -2692,14 +2693,6 @@
                                    duration, is_keyframe, is_bframe,
                                    &track, &pkt);
 
-    if (pkt)
-    {
-        if (duration != AV_NOPTS_VALUE)
-            pkt->duration = duration;
-        else if (track >= 0 && track < matroska->num_tracks)
-            pkt->duration = matroska->tracks[track]->default_duration;
-    }
-
     return res;
 }