1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
From 2488090353fc122b4af030ea55bbff494c204c9b Mon Sep 17 00:00:00 2001
From: Vittorio Giovara <vittorio.giovara@gmail.com>
Date: Tue, 10 Nov 2015 13:53:12 +0100
Subject: [PATCH] videorec: Fix flushing encoders
When passing NULL frames, encoders empty their queues, but we have
to stop polling from them when they don't any more data.
--HG--
extra : hg-git-rename-source : git
---
hedgewars/avwrapper/avwrapper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hedgewars/avwrapper/avwrapper.c b/hedgewars/avwrapper/avwrapper.c
index d6a07ab..232398c 100644
--- a/hedgewars/avwrapper/avwrapper.c
+++ b/hedgewars/avwrapper/avwrapper.c
@@ -508,7 +508,7 @@ AVWRAP_DECL int AVWrapper_Close()
{
do
ret = WriteFrame(NULL);
- while (ret >= 0);
+ while (ret > 0);
if (ret < 0)
return ret;
}
@@ -517,7 +517,7 @@ AVWRAP_DECL int AVWrapper_Close()
{
ret = WriteAudioFrame();
}
- while(ret >= 0);
+ while(ret > 0);
if (ret < 0)
return ret;
|