]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] switch_core_session_write_video_frame: Coverity 1546433 Check of thread-shared... coverity_06062024
authorAndrey Volk <andywolk@gmail.com>
Thu, 13 Jun 2024 10:15:44 +0000 (13:15 +0300)
committerAndrey Volk <andywolk@gmail.com>
Mon, 13 Jan 2025 22:00:45 +0000 (01:00 +0300)
src/switch_core_media.c

index de5d0eff74c395eb39fa2315e3332d0d144abd1e..04b055e9ff89e9b739c49e0c93933f8bb8051dc4 100644 (file)
@@ -14675,7 +14675,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_cor
        switch_codec_t *codec = switch_core_session_get_video_write_codec(session);
        switch_timer_t *timer;
        switch_media_handle_t *smh;
-       switch_image_t *dup_img = NULL, *img = frame->img;
+       switch_image_t *dup_img = NULL, *img = NULL;
        switch_status_t encode_status;
        switch_frame_t write_frame = {0};
        switch_rtp_engine_t *v_engine = NULL;
@@ -14736,6 +14736,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_cor
                smh->video_last_key_time = now;
        }
 
+       img = frame->img;
+
        if (!img) {
                switch_status_t vstatus;