summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xine-engine/video_decoder.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index 29cf8a7e3..ca11f359a 100644
--- a/src/xine-engine/video_decoder.c
+++ b/src/xine-engine/video_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_decoder.c,v 1.126 2003/02/16 19:55:16 guenter Exp $
+ * $Id: video_decoder.c,v 1.127 2003/02/18 18:35:02 mroi Exp $
*
*/
@@ -205,6 +205,9 @@ void *video_decoder_loop (void *stream_gen) {
printf ("video_decoder: discontinuity ahead\n");
#endif
if (stream->video_decoder_plugin) {
+ /* it might be a long time before we get back from a discontinuity, so we better flush
+ * the decoder before */
+ stream->video_decoder_plugin->flush (stream->video_decoder_plugin);
stream->video_decoder_plugin->discontinuity (stream->video_decoder_plugin);
}
@@ -217,6 +220,9 @@ void *video_decoder_loop (void *stream_gen) {
printf ("video_decoder: new pts %lld\n", buf->disc_off);
#endif
if (stream->video_decoder_plugin) {
+ /* it might be a long time before we get back from a discontinuity, so we better flush
+ * the decoder before */
+ stream->video_decoder_plugin->flush (stream->video_decoder_plugin);
stream->video_decoder_plugin->discontinuity (stream->video_decoder_plugin);
}
@@ -367,13 +373,13 @@ void video_decoder_init (xine_stream_t *stream) {
int err;
/* The fifo size is based on dvd playback where buffers are filled
- * with 2k of data. With 1000 buffers and a typical video data rate
- * of 8 Mbit/s, the fifo can hold about 2 seconds of video, wich
+ * with 2k of data. With 500 buffers and a typical video data rate
+ * of 4 Mbit/s, the fifo can hold about 2 seconds of video, wich
* should be enough to compensate for drive delays.
* We provide buffers of 8k size instead of 2k for demuxers sending
* larger chunks.
*/
- stream->video_fifo = fifo_buffer_new (1000, 8192);
+ stream->video_fifo = fifo_buffer_new (500, 8192);
stream->spu_track_map_entries = 0;
pthread_attr_init(&pth_attrs);