From 0f73474fca60c3b06afab7906d0671ac3bef42b4 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 26 Jun 2008 06:42:03 +0300 Subject: Fix compilation with dvdnav enabled Some dvdnav-specific code had not been properly updated after moving options to option struct and removing global mpctx. --- mplayer.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mplayer.c b/mplayer.c index 6afe73f3fe..3c487d3be6 100644 --- a/mplayer.c +++ b/mplayer.c @@ -1830,6 +1830,7 @@ static mp_image_t * mp_dvdnav_copy_mpi(mp_image_t *to_mpi, } static void mp_dvdnav_reset_stream (MPContext *ctx) { + struct MPOpts *opts = &ctx->opts; if (ctx->sh_video) { /// clear video pts ctx->d_video->pts = 0.0f; @@ -1863,7 +1864,8 @@ static void mp_dvdnav_reset_stream (MPContext *ctx) { } /// Restore last decoded DVDNAV (still frame) -static mp_image_t *mp_dvdnav_restore_smpi(int *in_size, +static mp_image_t *mp_dvdnav_restore_smpi(struct MPContext *mpctx, + int *in_size, unsigned char **start, mp_image_t *decoded_frame) { @@ -1907,7 +1909,7 @@ static mp_image_t *mp_dvdnav_restore_smpi(int *in_size, } /// Save last decoded DVDNAV (still frame) -static void mp_dvdnav_save_smpi(int in_size, +static void mp_dvdnav_save_smpi(struct MPContext *mpctx, int in_size, unsigned char *start, mp_image_t *decoded_frame) { @@ -2282,7 +2284,8 @@ static double update_video(struct MPContext *mpctx, int *blit_frame) update_osd_msg(mpctx); current_module = "decode_video"; #ifdef USE_DVDNAV - decoded_frame = mp_dvdnav_restore_smpi(&in_size,&start,decoded_frame); + decoded_frame = mp_dvdnav_restore_smpi(mpctx, &in_size,&start, + decoded_frame); /// still frame has been reached, no need to decode if (in_size > 0 && !decoded_frame) #endif @@ -2290,7 +2293,7 @@ static double update_video(struct MPContext *mpctx, int *blit_frame) sh_video->pts); #ifdef USE_DVDNAV /// save back last still frame for future display - mp_dvdnav_save_smpi(in_size,start,decoded_frame); + mp_dvdnav_save_smpi(mpctx, in_size, start, decoded_frame); #endif current_module = "filter_video"; *blit_frame = (decoded_frame && filter_video(sh_video, decoded_frame, -- cgit v1.2.3