core: make sure hw decoding works when playing multiple files

The hw decoding context was set only for the first file (when the VO was
initialized), instead of every file.
This commit is contained in:
wm4 2013-08-09 18:42:29 +02:00
parent c6db8f6a8b
commit abe47a4840
1 changed files with 5 additions and 5 deletions

View File

@ -2384,13 +2384,13 @@ int reinit_video_chain(struct MPContext *mpctx)
&(bool){false});
}
mpctx->initialized_flags |= INITIALIZED_VO;
// dynamic allocation only to make stheader.h lighter
talloc_free(sh_video->hwdec_info);
sh_video->hwdec_info = talloc_zero(sh_video, struct mp_hwdec_info);
vo_control(mpctx->video_out, VOCTRL_GET_HWDEC_INFO, sh_video->hwdec_info);
}
// dynamic allocation only to make stheader.h lighter
talloc_free(sh_video->hwdec_info);
sh_video->hwdec_info = talloc_zero(sh_video, struct mp_hwdec_info);
vo_control(mpctx->video_out, VOCTRL_GET_HWDEC_INFO, sh_video->hwdec_info);
vo_update_window_title(mpctx);
if (stream_control(mpctx->sh_video->gsh->demuxer->stream,