spupng subtitle offset set according to dvb spec

This commit is contained in:
Anshul Maheshwari
2014-06-01 10:33:48 +05:30
parent 016674b0eb
commit d0f896cd2d
3 changed files with 8 additions and 4 deletions

View File

@@ -794,6 +794,7 @@ static void save_display_set(DVBSubContext *ctx)
filename = get_spupng_filename(sp);
inc_spupng_fileindex(sp);
set_spupng_offset(sp,y_pos,x_pos);
pbuf = (uint8_t*) malloc(width * height);
memset(pbuf, 0x0, width * height);
@@ -1768,10 +1769,6 @@ static void dvbsub_parse_page_segment(void *dvb_ctx, const uint8_t *buf,
delete_objects(ctx);
delete_cluts(ctx);
}
else if(page_state == 0)
{
}
tmp_display_list = ctx->display_list;
ctx->display_list = NULL;

View File

@@ -326,4 +326,10 @@ void inc_spupng_fileindex(void *ctx)
struct spupng_t *sp = (struct spupng_t *)ctx;
sp->fileIndex++;
}
void set_spupng_offset(void *ctx,int x,int y)
{
struct spupng_t *sp = (struct spupng_t *)ctx;
sp->xOffset = x;
sp->yOffset = y;
}

View File

@@ -31,4 +31,5 @@ void write_sputag(struct spupng_t *sp,LLONG ms_start,LLONG ms_end);
void write_spucomment(struct spupng_t *sp,const char *str);
char* get_spupng_filename(void *ctx);
void inc_spupng_fileindex(void *ctx);
void set_spupng_offset(void *ctx,int x,int y);
#endif