aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/recorder_output_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/output/recorder_output_plugin.c')
-rw-r--r--src/output/recorder_output_plugin.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/output/recorder_output_plugin.c b/src/output/recorder_output_plugin.c
index ac4a52107..b84cb244c 100644
--- a/src/output/recorder_output_plugin.c
+++ b/src/output/recorder_output_plugin.c
@@ -160,17 +160,20 @@ recorder_output_encoder_to_file(struct recorder_output *recorder,
{
assert(recorder->fd >= 0);
- /* read from the encoder */
+ while (true) {
+ /* read from the encoder */
- size_t size = encoder_read(recorder->encoder, recorder->buffer,
- sizeof(recorder->buffer));
- if (size == 0)
- return true;
+ size_t size = encoder_read(recorder->encoder, recorder->buffer,
+ sizeof(recorder->buffer));
+ if (size == 0)
+ return true;
- /* write everything into the file */
+ /* write everything into the file */
- return recorder_write_to_file(recorder, recorder->buffer, size,
- error_r);
+ if (!recorder_write_to_file(recorder, recorder->buffer, size,
+ error_r))
+ return false;
+ }
}
static bool