changeset 20005:447e41fbcb4e

Reset demuxer->sub (consistently with audio and video) after seeking and at the end of demux_mpg_open() to prevent ghost packets. Patch by Olaf Mandel - olaf mandel name.
author nicodvb
date Sun, 01 Oct 2006 09:33:23 +0000
parents 9d31ce6908cf
children bdd8965d6e48
files libmpdemux/demux_mpg.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mpg.c	Sun Oct 01 09:25:34 2006 +0000
+++ b/libmpdemux/demux_mpg.c	Sun Oct 01 09:33:23 2006 +0000
@@ -137,6 +137,7 @@
     }
     ds_free_packs(demuxer->audio);
     ds_free_packs(demuxer->video);
+    ds_free_packs(demuxer->sub);
     demuxer->stream->eof=0; // clear eof flag
     demuxer->video->eof=0;
     demuxer->audio->eof=0;
@@ -791,6 +792,7 @@
         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);
         demuxer->stream->eof=0; // clear eof flag
         d_video->eof=0;
         d_audio->eof=0;