summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mencoder.c10
-rw-r--r--mplayer.c14
2 files changed, 12 insertions, 12 deletions
diff --git a/mencoder.c b/mencoder.c
index 0ca429f9c2..7559478e2e 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -1347,7 +1347,7 @@ default:
// decode_video will callback down to ve_*.c encoders, through the video filters
sh_video->vfilter->control(sh_video->vfilter, VFCTRL_SET_OSD_OBJ, osd);
{void *decoded_frame = decode_video(sh_video,frame_data.start,frame_data.in_size,
- skip_flag>0 && (!sh_video->vfilter || ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) != CONTROL_TRUE), MP_NOPTS_VALUE);
+ skip_flag>0 && (!sh_video->vfilter || sh_video->vfilter->control(sh_video->vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) != CONTROL_TRUE), MP_NOPTS_VALUE);
blit_frame = decoded_frame && filter_video(sh_video, decoded_frame, MP_NOPTS_VALUE, osd);}
if (sh_video->vf_initialized < 0) mencoder_exit(1, NULL);
@@ -1367,7 +1367,7 @@ default:
// Eventually this entire block should probably be removed.
if(skip_limit==0){
// skipping not allowed -> write empty frame:
- if (!encode_duplicates || !sh_video->vfilter || ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_DUPLICATE_FRAME, 0) != CONTROL_TRUE)
+ if (!encode_duplicates || !sh_video->vfilter || sh_video->vfilter->control(sh_video->vfilter, VFCTRL_DUPLICATE_FRAME, 0) != CONTROL_TRUE)
muxer_write_chunk(mux_v,0,0, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
} else {
// skipping allowed -> skip it and distriubute timer error:
@@ -1386,7 +1386,7 @@ if(skip_flag<0){
if(!quiet) mp_msg(MSGT_MENCODER, MSGL_WARN, MSGTR_DuplicateFrames,-skip_flag);
while(skip_flag<0){
duplicatedframes++;
- if (!encode_duplicates || !sh_video->vfilter || ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_DUPLICATE_FRAME, 0) != CONTROL_TRUE)
+ if (!encode_duplicates || !sh_video->vfilter || sh_video->vfilter->control(sh_video->vfilter, VFCTRL_DUPLICATE_FRAME, 0) != CONTROL_TRUE)
muxer_write_chunk(mux_v,0,0, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
++skip_flag;
}
@@ -1550,10 +1550,10 @@ if (!interrupted && filelist[++curfile].name != 0) {
/*TODO emit frmaes delayed by decoder lag*/
if(sh_video && sh_video->vfilter){
mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_FlushingVideoFrames);
- if (!((vf_instance_t *)sh_video->vfilter)->fmt.have_configured)
+ if (!sh_video->vfilter->fmt.have_configured)
mp_msg(MSGT_MENCODER, MSGL_WARN, MSGTR_FiltersHaveNotBeenConfiguredEmptyFile);
else
- ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter,
+ sh_video->vfilter->control(sh_video->vfilter,
VFCTRL_FLUSH_FRAMES, 0);
}
diff --git a/mplayer.c b/mplayer.c
index af782b2fac..45f1564fb0 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -2154,7 +2154,7 @@ int reinit_video_chain(struct MPContext *mpctx)
current_module="init_video_filters";
{
char* vf_arg[] = { "_oldargs_", (char*)mpctx->video_out , NULL };
- sh_video->vfilter=(void*)vf_open_filter(opts, NULL,"vo",vf_arg);
+ sh_video->vfilter = vf_open_filter(opts, NULL,"vo",vf_arg);
}
#ifdef HAVE_MENU
if(use_menu) {
@@ -2166,7 +2166,7 @@ int reinit_video_chain(struct MPContext *mpctx)
}
}
if(vf_menu)
- sh_video->vfilter=(void*)vf_menu;
+ sh_video->vfilter = vf_menu;
#endif
#ifdef USE_ASS
@@ -2185,18 +2185,18 @@ int reinit_video_chain(struct MPContext *mpctx)
char* vf_arg[] = {"auto", "1", NULL};
vf_instance_t* vf_ass = vf_open_plugin(opts, libass_vfs,sh_video->vfilter,"ass",vf_arg);
if (vf_ass)
- sh_video->vfilter=(void*)vf_ass;
+ sh_video->vfilter = vf_ass;
else
mp_msg(MSGT_CPLAYER,MSGL_ERR, "ASS: cannot add video filter\n");
}
}
#endif
- sh_video->vfilter=(void*)append_filters(sh_video->vfilter, opts->vf_settings);
+ sh_video->vfilter = append_filters(sh_video->vfilter, opts->vf_settings);
#ifdef USE_ASS
if (ass_enabled)
- ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_INIT_EOSD, ass_library);
+ sh_video->vfilter->control(sh_video->vfilter, VFCTRL_INIT_EOSD, ass_library);
#endif
current_module="init_video_codec";
@@ -2301,8 +2301,8 @@ static double update_video(struct MPContext *mpctx, int *blit_frame)
int res = generate_video_frame(mpctx);
if (!res)
return -1;
- ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter,
- VFCTRL_GET_PTS, &sh_video->pts);
+ sh_video->vfilter->control(sh_video->vfilter, VFCTRL_GET_PTS,
+ &sh_video->pts);
if (sh_video->pts == MP_NOPTS_VALUE) {
mp_msg(MSGT_CPLAYER, MSGL_ERR, "pts after filters MISSING\n");
sh_video->pts = sh_video->last_pts;