changeset 26927:ff446aa58931

use demux_flush() where appropriate
author nicodvb
date Mon, 02 Jun 2008 10:18:44 +0000
parents 1e6241274552
children 942e562ca4a9
files libmpdemux/demux_mpg.c
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mpg.c	Mon Jun 02 10:17:48 2008 +0000
+++ b/libmpdemux/demux_mpg.c	Mon Jun 02 10:18:44 2008 +0000
@@ -158,9 +158,7 @@
   if(found == 3) pts = found_pts3;
 
   //clean up from searching of first pts;
-  ds_free_packs(demuxer->audio);
-  ds_free_packs(demuxer->video);
-  ds_free_packs(demuxer->sub);
+  demux_flush(demuxer);
 
   return pts;
 }
@@ -981,9 +979,7 @@
         //prepare another seek because we are off by more than 0.5s
 	if(mpg_d) {
         newpos += (newpts - mpg_d->last_pts) * (newpos - oldpos) / (mpg_d->last_pts - oldpts);
-        ds_free_packs(d_audio);
-        ds_free_packs(d_video);
-        ds_free_packs(demuxer->sub);
+        demux_flush(demuxer);
         demuxer->stream->eof=0; // clear eof flag
         d_video->eof=0;
         d_audio->eof=0;