get rid of most compiler warnings

This commit is contained in:
martii
2012-10-27 18:08:29 +02:00
committed by Stefan Seyfried
parent e94b7daf85
commit 1cc9619c49
8 changed files with 69 additions and 2 deletions

View File

@@ -464,6 +464,31 @@ static void ASSThread(Context_t *context) {
* so there is hopefully installed an output callback
* in the subtitle output!
*/
#ifdef MARTII
SubtitleOut_t sub_out;
sub_out.type = eSub_Gfx;
if (ass_track->events)
{
/* fixme: check values */
sub_out.pts = ass_track->events->Start * 90.0;
sub_out.duration = ass_track->events->Duration / 1000.0;
} else
{
sub_out.pts = playPts;
sub_out.duration = 10.0;
}
sub_out.u.gfx.data = img->bitmap;
sub_out.u.gfx.Width = img->w;
sub_out.u.gfx.Height = img->h;
sub_out.u.gfx.x = img->dst_x;
sub_out.u.gfx.y = img->dst_y;
if(context && context->playback && context->playback->isPlaying &&
context->output && context->output->subtitle)
context->output->subtitle->Write(context, &sub_out);
#else
SubtitleOut_t out;
out.type = eSub_Gfx;
@@ -487,6 +512,7 @@ static void ASSThread(Context_t *context) {
if(context && context->playback && context->playback->isPlaying &&
context->output && context->output->subtitle)
context->output->subtitle->Write(context, &out);
#endif
}
}

View File

@@ -116,7 +116,11 @@ void data_to_manager(Context_t *context, char* Text, unsigned long long int Pts,
SubtitleData_t data;
data.data = line;
data.len = strlen((char*)line);
#ifdef MARTII
data.extradata = (unsigned char *) DEFAULT_ASS_HEAD;
#else
data.extradata = DEFAULT_ASS_HEAD;
#endif
data.extralen = strlen(DEFAULT_ASS_HEAD);
data.pts = Pts*90;
data.duration = Duration;

View File

@@ -104,7 +104,12 @@ static int hasThreadStarted = 0;
char *SSAgetLine()
{
char *strAux = NULL, *strInput;
#ifdef MARTII
char c[SSA_BUFFER_SIZE];
int ch;
#else
char c[SSA_BUFFER_SIZE], ch;
#endif
int k, tam, tamAux;
k = tamAux = 0;
@@ -157,8 +162,13 @@ char *SSAgetLine()
/* ***************************** */
/* Worker Thread */
/* ***************************** */
#ifdef MARTII
static void* SsaSubtitleThread(void *Data) {
Context_t *context = (Context_t*) Data;
#else
static void* SsaSubtitleThread(void *data) {
Context_t *context = (Context_t*) data;
#endif
char * head =malloc(sizeof(char)*1);
ssa_printf(10, "\n");