[vlc-commits] bluray: remove redundant casts
Rémi Denis-Courmont
git at videolan.org
Wed Apr 19 19:47:19 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 19 20:10:02 2017 +0300| [512d3318238155e464345772f61436b38da26a53] | committer: Rémi Denis-Courmont
bluray: remove redundant casts
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=512d3318238155e464345772f61436b38da26a53
---
modules/access/bluray.c | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/modules/access/bluray.c b/modules/access/bluray.c
index 76eee0ecd1..831af1ecff 100644
--- a/modules/access/bluray.c
+++ b/modules/access/bluray.c
@@ -1797,12 +1797,12 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
case DEMUX_CAN_SEEK:
case DEMUX_CAN_PAUSE:
case DEMUX_CAN_CONTROL_PACE:
- pb_bool = (bool*)va_arg(args, bool *);
+ pb_bool = va_arg(args, bool *);
*pb_bool = true;
break;
case DEMUX_GET_PTS_DELAY:
- pi_64 = (int64_t*)va_arg(args, int64_t *);
+ pi_64 = va_arg(args, int64_t *);
*pi_64 = INT64_C(1000) * var_InheritInteger(p_demux, "disc-caching");
break;
@@ -1818,13 +1818,13 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
}
case DEMUX_SET_ES:
{
- int i_id = (int)va_arg(args, int);
+ int i_id = va_arg(args, int);
blurayStreamSelected(p_sys, i_id);
break;
}
case DEMUX_SET_TITLE:
{
- int i_title = (int)va_arg(args, int);
+ int i_title = va_arg(args, int);
if (bluraySetTitle(p_demux, i_title) != VLC_SUCCESS) {
/* make sure GUI restores the old setting in title menu ... */
p_demux->info.i_update |= INPUT_UPDATE_TITLE | INPUT_UPDATE_SEEKPOINT;
@@ -1834,7 +1834,7 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
}
case DEMUX_SET_SEEKPOINT:
{
- int i_chapter = (int)va_arg(args, int);
+ int i_chapter = va_arg(args, int);
bd_seek_chapter(p_sys->bluray, i_chapter);
p_demux->info.i_update |= INPUT_UPDATE_SEEKPOINT;
break;
@@ -1842,10 +1842,10 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
case DEMUX_GET_TITLE_INFO:
{
- input_title_t ***ppp_title = (input_title_t***)va_arg(args, input_title_t***);
- int *pi_int = (int*)va_arg(args, int*);
- int *pi_title_offset = (int*)va_arg(args, int*);
- int *pi_chapter_offset = (int*)va_arg(args, int*);
+ input_title_t ***ppp_title = va_arg(args, input_title_t***);
+ int *pi_int = va_arg(args, int *);
+ int *pi_title_offset = va_arg(args, int *);
+ int *pi_chapter_offset = va_arg(args, int *);
/* */
*pi_title_offset = 0;
@@ -1862,40 +1862,40 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
case DEMUX_GET_LENGTH:
{
- int64_t *pi_length = (int64_t*)va_arg(args, int64_t *);
+ int64_t *pi_length = va_arg(args, int64_t *);
*pi_length = p_demux->info.i_title < (int)p_sys->i_title ? CUR_LENGTH : 0;
return VLC_SUCCESS;
}
case DEMUX_SET_TIME:
{
- int64_t i_time = (int64_t)va_arg(args, int64_t);
+ int64_t i_time = va_arg(args, int64_t);
bd_seek_time(p_sys->bluray, TO_TICKS(i_time));
return VLC_SUCCESS;
}
case DEMUX_GET_TIME:
{
- int64_t *pi_time = (int64_t*)va_arg(args, int64_t *);
+ int64_t *pi_time = va_arg(args, int64_t *);
*pi_time = (int64_t)FROM_TICKS(bd_tell_time(p_sys->bluray));
return VLC_SUCCESS;
}
case DEMUX_GET_POSITION:
{
- double *pf_position = (double*)va_arg(args, double *);
+ double *pf_position = va_arg(args, double *);
*pf_position = p_demux->info.i_title < (int)p_sys->i_title && CUR_LENGTH > 0 ?
(double)FROM_TICKS(bd_tell_time(p_sys->bluray))/CUR_LENGTH : 0.0;
return VLC_SUCCESS;
}
case DEMUX_SET_POSITION:
{
- double f_position = (double)va_arg(args, double);
+ double f_position = va_arg(args, double);
bd_seek_time(p_sys->bluray, TO_TICKS(f_position*CUR_LENGTH));
return VLC_SUCCESS;
}
case DEMUX_GET_META:
{
- vlc_meta_t *p_meta = (vlc_meta_t *) va_arg (args, vlc_meta_t*);
+ vlc_meta_t *p_meta = va_arg(args, vlc_meta_t *);
const META_DL *meta = p_sys->p_meta;
if (meta == NULL)
return VLC_EGENERIC;
@@ -1937,8 +1937,8 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
case DEMUX_GET_ATTACHMENTS:
{
input_attachment_t ***ppp_attach =
- (input_attachment_t ***)va_arg(args, input_attachment_t ***);
- int *pi_int = (int *)va_arg(args, int *);
+ va_arg(args, input_attachment_t ***);
+ int *pi_int = va_arg(args, int *);
if (p_sys->i_attachments <= 0)
return VLC_EGENERIC;
More information about the vlc-commits
mailing list