media/liboggplay/bug481921.patch
author Johnny Stenback <jst@mozilla.com>
Mon, 31 Aug 2009 14:57:45 -0700
changeset 32114 5260e85b49fc4ba350d53d93f3e310ad462b11aa
parent 32100 fb6d235b9efb55e597d61f44e28b4eed39f2c245
child 32145 ad16a3878f78081d84fda09ee2b8eb5f4859da6e
permissions -rw-r--r--
Backed out changeset 7d5e1bcb4729 due to mochitest errors.

diff --git a/media/liboggplay/src/liboggplay/oggplay_callback_info.c b/media/liboggplay/src/liboggplay/oggplay_callback_info.c
--- a/media/liboggplay/src/liboggplay/oggplay_callback_info.c
+++ b/media/liboggplay/src/liboggplay/oggplay_callback_info.c
@@ -185,21 +185,23 @@ oggplay_callback_info_prepare(OggPlay *m
 
     track_info->available_records = count;
     track_info->required_records = 0;
 
     track_info->data_type = track->decoded_type;
  
     count = 0;
     for (p = q; p != NULL; p = p->next) {
-      track_info->records[count++] = p;
-      if (p->presentation_time <= me->target + track->offset) {
-        track_info->required_records++;
-        p->has_been_presented = 1;
-        //lpt = p->presentation_time;
+      if (!p->has_been_presented) {
+        track_info->records[count++] = p;
+        if (p->presentation_time <= me->target + track->offset) {
+          track_info->required_records++;
+          p->has_been_presented = 1;
+          //lpt = p->presentation_time;
+        }
       }
     }
      
     if (track_info->required_records > 0) {
       /*
        * if the StreamState is FIRST_DATA then update it to INITIALISED, 
        * as we've marked the first data instance
        */