]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
main/file: fix translated-frame write loop to use current frame
authorTinet-mucw <mucw@ti-net.com.cn>
Sat, 28 Feb 2026 01:35:08 +0000 (17:35 -0800)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Tue, 3 Mar 2026 21:51:53 +0000 (21:51 +0000)
write each translated frame from translator output.

Resolves: #1797

main/file.c

index 6363387fd7d5606a88d2ea8fbd44103ed8b391bf..c71e80d167adfc51bab621e0c33a7429255d01e6 100644 (file)
@@ -300,7 +300,7 @@ int ast_writestream(struct ast_filestream *fs, struct ast_frame *f)
 
                                /* the translator may have returned multiple frames, so process them */
                                for (cur = trf; cur; cur = AST_LIST_NEXT(cur, frame_list)) {
-                                       if ((res = fs->fmt->write(fs, trf))) {
+                                       if ((res = fs->fmt->write(fs, cur))) {
                                                ast_log(LOG_WARNING, "Translated frame write failed\n");
                                                break;
                                        }