changeset 16302:36a018da4c27

Fixed seeking for AVC-in-Matroska (wrong assumption of what kind of references may be present for a non-I-frame).
author mosu
date Wed, 24 Aug 2005 12:33:32 +0000
parents c730c7939457
children a87c6cf3fe52
files libmpdemux/demux_mkv.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Wed Aug 24 00:46:04 2005 +0000
+++ b/libmpdemux/demux_mkv.c	Wed Aug 24 12:33:32 2005 +0000
@@ -2919,7 +2919,7 @@
   else if (num == demuxer->video->id)
     {
       ds = demuxer->video;
-      if (mkv_d->v_skip_to_keyframe && block_bref != 0)
+      if (mkv_d->v_skip_to_keyframe && (block_bref != 0 || block_fref != 0))
         use_this_block = 0;
     }
   else if (num == demuxer->sub->id)
@@ -2962,7 +2962,7 @@
                   memcpy (dp->buffer, buffer, size);
                   if (modified)
                     free (buffer);
-                  dp->flags = block_bref == 0 ? 1 : 0;
+                  dp->flags = (block_bref == 0 && block_fref == 0) ? 1 : 0;
                   dp->pts = mkv_d->last_pts + i * track->default_duration;
                   ds_add_packet (ds, dp);
                 }