changeset 1849:5f246fcc2971

Resetting stream and sync for seek, no correct test files yet for proper testing but should be ok.
author atmos4
date Sun, 02 Sep 2001 23:06:21 +0000
parents 8ce1c088d05d
children 62b8e85865a2
files dec_audio.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dec_audio.c	Sun Sep 02 21:49:21 2001 +0000
+++ b/dec_audio.c	Sun Sep 02 23:06:21 2001 +0000
@@ -409,7 +409,6 @@
     }
   }
   mp_msg(MSGT_DECAUDIO,MSGL_V,"OggVorbis: Pageout: successfull.\n");
-  /* commenting out pagein to leave data (hopefully) to the decoder - atmos */
   ogg_stream_pagein(&sh_audio->ov->os,&sh_audio->ov->og); /* we can ignore any errors here
   					 as they'll also become apparent
   					 at packetout */
@@ -666,6 +665,13 @@
           MP3_DecodeFrame(NULL,-2); // resync
           MP3_DecodeFrame(NULL,-2); // resync
           break;
+#ifdef HAVE_OGGVORBIS
+        case AFM_VORBIS:
+          //printf("OggVorbis: resetting stream.\n");
+          ogg_sync_reset(&sh_audio->ov->oy);
+          ogg_stream_reset(&sh_audio->ov->os);
+          break;
+#endif
         case AFM_AC3:
           ac3_bitstream_reset();    // reset AC3 bitstream buffer
     //      if(verbose){ printf("Resyncing AC3 audio...");fflush(stdout);}