]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_opusfile] not draining before destroying encoder causes loss on encoded file 1259/head
authorbmlkc <bahadirmlkc@gmail.com>
Fri, 9 Jul 2021 18:44:43 +0000 (20:44 +0200)
committerbmlkc <bahadirmlkc@gmail.com>
Fri, 9 Jul 2021 18:44:43 +0000 (20:44 +0200)
src/mod/formats/mod_opusfile/mod_opusfile.c

index 25246a7ced21839cb0c116a3d1018426656763b0..ae6eebed153b0fc07589b5c1732888e14c4750ce 100644 (file)
@@ -316,6 +316,7 @@ static switch_status_t switch_opusfile_close(switch_file_handle_t *handle)
        }
 #ifdef HAVE_OPUSFILE_ENCODE
        if (context->enc) {
+               ope_encoder_drain(context->enc);
                ope_encoder_destroy(context->enc);
        }
        if (context->comments) {