From d9d91c4a8d752ef97933eed30957d3ab4e9633f7 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 20 Oct 2019 13:32:16 -0400 Subject: [PATCH] Fix #2728 by resetting the frame size before reading from the fifo --- src/zm_videostore.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index 2a2a28bfe..26fa09736 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -952,6 +952,9 @@ int VideoStore::writeAudioFramePacket(AVPacket *ipkt) { if ( zm_add_samples_to_fifo(fifo, out_frame) <= 0 ) break; + // We put the samples into the fifo so we are basically resetting the frame + out_frame->nb_samples = audio_out_ctx->frame_size; + if ( zm_get_samples_from_fifo(fifo, out_frame) <= 0 ) break;