summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-01-05 22:55:57 +0100
committerJohns <johns98@gmx.net>2012-01-05 22:55:57 +0100
commit820c2461483cf380226fca410e723557c106a027 (patch)
tree02eed98cb99441ff12118ab24f9be930ce85a8ef
parent8dda2a0b8a5bd3bc1169baffec450d241a2bc3f2 (diff)
downloadvdr-plugin-softhddevice-820c2461483cf380226fca410e723557c106a027.tar.gz
vdr-plugin-softhddevice-820c2461483cf380226fca410e723557c106a027.tar.bz2
Fix bug: old surface stay in video ringbuffer.
-rw-r--r--video.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/video.c b/video.c
index fa4da98..2e46751 100644
--- a/video.c
+++ b/video.c
@@ -1146,6 +1146,7 @@ static void VaapiCleanup(VaapiDecoder * decoder)
{
int filled;
VASurfaceID surface;
+ int i;
// flush output queue, only 1-2 frames buffered, no big loss
while ((filled = atomic_read(&decoder->SurfacesFilled))) {
@@ -1169,6 +1170,11 @@ static void VaapiCleanup(VaapiDecoder * decoder)
abort();
}
+ // clear ring buffer
+ for (i = 0; i < VIDEO_SURFACES_MAX; ++i) {
+ decoder->SurfacesRb[i] = VA_INVALID_ID;
+ }
+
decoder->WrongInterlacedWarned = 0;
// cleanup image