mirror of
https://github.com/mpv-player/mpv
synced 2025-02-23 16:36:56 +00:00
sub: remove unused video width/height headers
Apparently, this was replaced by the SD_CTRL_SET_VIDEO_PARAMS set dimensions. But I can't find out when this happened - possibly, these fields were never used by sd_lavc.c, and only by the (long removed) MPlayer dvdsub decoder.
This commit is contained in:
parent
00135a87f0
commit
5dd5dc66c1
@ -258,13 +258,10 @@ static void reinit_subdec(struct MPContext *mpctx, struct track *track,
|
||||
|
||||
struct sh_video *sh_video =
|
||||
mpctx->d_video ? mpctx->d_video->header->video : NULL;
|
||||
int w = sh_video ? sh_video->disp_w : 0;
|
||||
int h = sh_video ? sh_video->disp_h : 0;
|
||||
float fps = sh_video ? sh_video->fps : 25;
|
||||
|
||||
init_sub_renderer(mpctx);
|
||||
|
||||
sub_set_video_res(dec_sub, w, h);
|
||||
sub_set_video_fps(dec_sub, fps);
|
||||
sub_set_ass_renderer(dec_sub, mpctx->ass_library, mpctx->ass_renderer,
|
||||
&mpctx->ass_lock);
|
||||
|
@ -112,14 +112,6 @@ bool sub_is_initialized(struct dec_sub *sub)
|
||||
return r;
|
||||
}
|
||||
|
||||
void sub_set_video_res(struct dec_sub *sub, int w, int h)
|
||||
{
|
||||
pthread_mutex_lock(&sub->lock);
|
||||
sub->init_sd.sub_video_w = w;
|
||||
sub->init_sd.sub_video_h = h;
|
||||
pthread_mutex_unlock(&sub->lock);
|
||||
}
|
||||
|
||||
void sub_set_video_fps(struct dec_sub *sub, double fps)
|
||||
{
|
||||
pthread_mutex_lock(&sub->lock);
|
||||
|
@ -29,7 +29,6 @@ void sub_destroy(struct dec_sub *sub);
|
||||
void sub_lock(struct dec_sub *sub);
|
||||
void sub_unlock(struct dec_sub *sub);
|
||||
|
||||
void sub_set_video_res(struct dec_sub *sub, int w, int h);
|
||||
void sub_set_video_fps(struct dec_sub *sub, double fps);
|
||||
void sub_set_ass_renderer(struct dec_sub *sub, struct ass_library *ass_library,
|
||||
struct ass_renderer *ass_renderer,
|
||||
|
5
sub/sd.h
5
sub/sd.h
@ -17,11 +17,6 @@ struct sd {
|
||||
void *priv;
|
||||
|
||||
struct sh_stream *sh;
|
||||
|
||||
// Video resolution used for subtitle decoding. Doesn't necessarily match
|
||||
// the resolution of the VO, nor does it have to be the OSD resolution.
|
||||
int sub_video_w, sub_video_h;
|
||||
|
||||
double video_fps;
|
||||
|
||||
// Shared renderer for ASS - done to avoid reloading embedded fonts.
|
||||
|
Loading…
Reference in New Issue
Block a user