1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 23:02:37 +00:00

demux_mpg, ass_mp: fix warnings

The warnings in demux_mpg were silenced by additional no-operation
casts.

A variable in ass_mp was used only for some versions of libass; now the
declaration is in that version #ifdef too to avoid a compiler warning.
This commit is contained in:
Rudolf Polzer 2012-12-28 08:38:18 +01:00
parent c3cc38e4c4
commit 671ca2a570
2 changed files with 6 additions and 2 deletions

View File

@ -844,7 +844,7 @@ static int demux_mpg_gxf_fill_buffer(demuxer_t *demux, demux_stream_t *ds) {
return 0;
}
{
register uint32_t state = (uint32_t)demux->priv;
register uint32_t state = (uint32_t)(uintptr_t)demux->priv;
register int pos = -len;
unsigned char *buf = &pack->buffer[len];
do {
@ -852,7 +852,7 @@ static int demux_mpg_gxf_fill_buffer(demuxer_t *demux, demux_stream_t *ds) {
if (unlikely((state | 3) == 0x1bf))
pos = find_end(&buf, pos, demux->stream);
} while (++pos < 0);
demux->priv = (void *)state;
demux->priv = (void *)(uintptr_t)state;
len = buf - pack->buffer;
}
if (len < STREAM_BUFFER_SIZE)

View File

@ -232,13 +232,17 @@ void mp_ass_configure(ASS_Renderer *priv, struct MPOpts *opts,
ass_set_margins(priv, dim->mt, dim->mb, dim->ml, dim->mr);
int set_use_margins = 0;
#if LIBASS_VERSION >= 0x01010000
int set_sub_pos = 0;
#endif
float set_line_spacing = 0;
float set_font_scale = 1;
int set_hinting = 0;
if (opts->ass_style_override) {
set_use_margins = opts->ass_use_margins;
#if LIBASS_VERSION >= 0x01010000
set_sub_pos = 100 - sub_pos;
#endif
set_line_spacing = opts->ass_line_spacing;
set_font_scale = opts->sub_scale;
set_hinting = opts->ass_hinting & 3; // +4 was for no hinting if scaled