]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_av] don't exit on decode errs just continue
authorAnthony Minessale <anthm@signalwire.com>
Sat, 27 Jun 2020 19:27:14 +0000 (19:27 +0000)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:00:33 +0000 (22:00 +0300)
src/mod/applications/mod_av/avformat.c

index 398bd14d7ef87f28b75a06c4b309203a6bc24548..e8c83fa2ceefef4f61945e787a47c9abdde8ad10 100644 (file)
@@ -1439,7 +1439,7 @@ GCC_DIAG_ON(deprecated-declarations)
                        } else {
                                char ebuf[255] = "";
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Could not read frame (error '%s')\n", get_error_text(error, ebuf, sizeof(ebuf)));
-                               break;
+                               continue;
                        }
                }
 
@@ -1491,7 +1491,7 @@ GCC_DIAG_ON(deprecated-declarations)
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Could not decode frame (error '%s')\n", get_error_text(error, ebuf, sizeof(ebuf)));
                                av_packet_unref(&pkt);
                                av_frame_free(&vframe);
-                               break;
+                               continue;
                        }
 
                        // switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "pkt: %d, pts: %lld dts: %lld\n", pkt.size, pkt.pts, pkt.dts);
@@ -1608,9 +1608,9 @@ GCC_DIAG_OFF(deprecated-declarations)
                        if ((error = avcodec_decode_audio4(context->audio_st[0].st->codec, &in_frame, &got_data, &pkt)) < 0) {
 GCC_DIAG_ON(deprecated-declarations)
                                char ebuf[255] = "";
                              switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Could not decode frame (error '%s')\n", get_error_text(error, ebuf, sizeof(ebuf)));
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Could not decode frame (error '%s')\n", get_error_text(error, ebuf, sizeof(ebuf)));
                                av_packet_unref(&pkt);
-                               break;
+                               continue;
                        }
 
                        // switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "pkt: %d, decodedddd: %d pts: %lld dts: %lld\n", pkt.size, error, pkt.pts, pkt.dts);