videorec: Fix flushing encoders 0.9.22
authorVittorio Giovara <vittorio.giovara@gmail.com>
Tue, 10 Nov 2015 13:53:12 +0100
branch0.9.22
changeset 11599 91d31e15f8f2
parent 11598 72be390795db
child 11600 9a17a39eccdc
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.
hedgewars/avwrapper/avwrapper.c
--- a/hedgewars/avwrapper/avwrapper.c	Tue Nov 10 13:53:10 2015 +0100
+++ b/hedgewars/avwrapper/avwrapper.c	Tue Nov 10 13:53:12 2015 +0100
@@ -514,7 +514,7 @@
     {
         do
             ret = WriteFrame(NULL);
-        while (ret >= 0);
+        while (ret > 0);
         if (ret < 0)
             return ret;
     }
@@ -523,7 +523,7 @@
     {
         ret = WriteAudioFrame();
     }
-    while(ret >= 0);
+    while(ret > 0);
     if (ret < 0)
         return ret;