diff options
author | Johns <johns98@gmx.net> | 2013-02-08 21:03:06 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2013-02-08 21:03:06 +0100 |
commit | d31ff55b12daf71d49b4cab06272b1d3e75f4272 (patch) | |
tree | a6832b8d9852ff087e2c20adcbc8cb8dae1c812c | |
parent | d4535a34c9afa899cc21eeba5cc0e6acedc7b1a9 (diff) | |
download | vdr-plugin-softhddevice-d31ff55b12daf71d49b4cab06272b1d3e75f4272.tar.gz vdr-plugin-softhddevice-d31ff55b12daf71d49b4cab06272b1d3e75f4272.tar.bz2 |
Clear buffers quicker, when replay stops.
-rw-r--r-- | softhddev.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/softhddev.c b/softhddev.c index 9877e8f..3cded90 100644 --- a/softhddev.c +++ b/softhddev.c @@ -1801,10 +1801,13 @@ int VideoDecodeInput(VideoStream * stream) if (!filled) { return -1; } +#if 0 // clearing for normal channel switch has no advantage if (stream->ClearClose /*|| stream->ClosingStream */ ) { int f; + // FIXME: during replay all packets are always checked + // flush buffers, if close is in the queue for (f = 0; f < filled; ++f) { avpkt = @@ -1822,6 +1825,8 @@ int VideoDecodeInput(VideoStream * stream) } stream->ClosingStream = 0; } +#endif + // // handle queued commands // @@ -2346,6 +2351,10 @@ int SetPlayMode(int play_mode) { VideoDisplayWakeup(); if (MyVideoStream->Decoder) { // tell video parser we have new stream + if (MyVideoStream->ClearClose) { // replay clear buffers on close + Clear(); // flush all buffers + MyVideoStream->ClearClose = 0; + } if (MyVideoStream->CodecID != CODEC_ID_NONE) { MyVideoStream->NewStream = 1; // tell hw decoder we are closing stream |