Commit 70eaa352 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Renderer: Fix win32 rendering, due to badly formated sprintf.

parent 73ddb678
......@@ -38,6 +38,8 @@ IF(WIN32)
# Building in release for WIN32
set(CMAKE_BUILD_TYPE "Release")
SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
# Use mingw's sprintf instead of windows's
ADD_DEFINITIONS( -D__USE_MINGW_ANSI_STDIO=1 )
ENDIF(WIN32)
# Optionally allow embedding libvlc into the binary as
......
......@@ -23,6 +23,8 @@
#include <QtDebug>
#include <QThread>
#include <QWaitCondition>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include "WorkflowRenderer.h"
#include "timeline/Timeline.h"
......@@ -93,10 +95,10 @@ WorkflowRenderer::setupRenderer( quint32 width, quint32 height, double fps )
//Clean any previous render.
memset( m_renderVideoFrame, 0, m_width * m_height * Pixel::NbComposantes );
sprintf( videoString, "width=%i:height=%i:dar=%s:fps=%s:data=%lld:codec=%s:cat=2:caching=0",
sprintf( videoString, "width=%i:height=%i:dar=%s:fps=%s:data=%" PRId64 ":codec=%s:cat=2:caching=0",
width, height, "16/9", "30/1",
(qint64)m_videoEsHandler, "RV24" );
sprintf( audioParameters, "data=%lld:cat=1:codec=f32l:samplerate=%u:channels=%u:caching=0",
sprintf( audioParameters, "data=%"PRId64":cat=1:codec=f32l:samplerate=%u:channels=%u:caching=0",
(qint64)m_audioEsHandler, m_rate, m_nbChannels );
strcpy( inputSlave, ":input-slave=imem://" );
strcat( inputSlave, audioParameters );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment