]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7514: [mod_vlc] temp workaround
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 11 Nov 2014 03:38:37 +0000 (21:38 -0600)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:46:44 +0000 (12:46 -0500)
src/mod/formats/mod_vlc/mod_vlc.c

index 12bdb2d88805f69d2c8e19e613a30aed440377f3..8435d1ff6064daf28e9b6bcdae586c31cc8111db 100644 (file)
@@ -264,11 +264,15 @@ static void vlc_video_unlock_callback(void *data, void *id, void *const *p_pixel
                frame->timestamp += delta * 90;
                context->last_video_ts = now;
        }
+       //printf("WTF VLC d_w=%d d_h=%d w=%d h=%d\n", context->img->d_w, context->img->d_h, context->img->w, context->img->h);
+
+       context->img->d_w = context->img->w;
+       context->img->d_h = context->img->h;
 
        switch_core_codec_encode_video(codec, context->img, frame->data, &encoded_data_len, &flag);
 
        while(encoded_data_len) {
-               // switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "encoded: %s [%d] flag=%d ts=%lld\n", codec->implementation->iananame, encoded_data_len, flag, context->last_video_ts);
+               //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "encoded: %s [%d] flag=%d ts=%ld\n", codec->implementation->iananame, encoded_data_len, flag, context->last_video_ts);
 
                frame->datalen = encoded_data_len;
                frame->packetlen = frame->datalen + 12;
@@ -293,6 +297,7 @@ static void vlc_video_unlock_callback(void *data, void *id, void *const *p_pixel
                switch_core_session_write_video_frame(context->session, frame, SWITCH_IO_FLAG_NONE, 0);
 
                encoded_data_len = 1500;
+
                switch_core_codec_encode_video(codec, NULL, frame->data, &encoded_data_len, &flag);
        }