]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7508: reset packet data on codec reset
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 3 Mar 2015 17:44:38 +0000 (11:44 -0600)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:08 +0000 (12:47 -0500)
src/mod/codecs/mod_vpx/mod_vpx.c

index 1b11fa1d98082397bf9a8541147aa993bb08a53a..eb82f9fb7b91e39a3b946e5839f409cc3fda2725 100644 (file)
@@ -146,6 +146,9 @@ static switch_status_t init_encoder(switch_codec_t *codec)
                context->bandwidth = 40960;
        }
 
+       context->pkt = NULL;
+       context->pkt_pos = 0;
+
        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(codec->session), SWITCH_LOG_NOTICE, 
                                          "VPX reset encoder picture from %dx%d to %dx%d %u BW\n", 
                                          config->g_w, config->g_h, context->codec_settings.video.width, context->codec_settings.video.height, context->bandwidth);
@@ -393,6 +396,8 @@ static void reset_codec_encoder(switch_codec_t *codec)
        context->framesum = 0;
        context->framecount = 0;
        context->encoder_init = 0;
+       context->pkt_pos = 0;
+       context->pkt = NULL;
        init_encoder(codec);
 }