diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-02-18 18:35:02 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-02-18 18:35:02 +0000 |
commit | 6481d71eceaf0f4a55cac49581fe28deadb1fc19 (patch) | |
tree | 08b4a4bcd8aeb782dca1028500d68d0ad19e6a80 | |
parent | f74f49ff130e177f1ec845f5b94d412a92e42870 (diff) | |
download | xine-lib-6481d71eceaf0f4a55cac49581fe28deadb1fc19.tar.gz xine-lib-6481d71eceaf0f4a55cac49581fe28deadb1fc19.tar.bz2 |
fix problem with not appearing still frames on DVDs
(detailed problem description: since the flush is asynchroneous now and stillframes
will only show up, when flushed out of libmpeg2, problems arise on stills with
audio, where the video decoder waits for an audio discontinuity, which is all the
way down on the bottom of the audio fifo; video_out can now put flush requests on
the video fifo, but they won't get processed)
CVS patchset: 4194
CVS date: 2003/02/18 18:35:02
-rw-r--r-- | src/xine-engine/video_decoder.c | 14 |
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); |