summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-01 23:15:50 +0200
committerwm4 <wm4@nowhere>2014-05-02 01:09:55 +0200
commit50ebcf1a432c4be5e458111b6915130424e56872 (patch)
treec43867cb9d450b6f6a86090bad4efb305c882c90 /player
parentf4eaceee0fe24a59828ce37f61173b1dd2afd8d4 (diff)
downloadmpv-50ebcf1a432c4be5e458111b6915130424e56872.tar.bz2
mpv-50ebcf1a432c4be5e458111b6915130424e56872.tar.xz
video: handle colorspace and aspect overrides separately
Now the video filter code handles these explicitly, which should increase robustness (or at least find bugs earlier).
Diffstat (limited to 'player')
-rw-r--r--player/command.c6
-rw-r--r--player/sub.c3
-rw-r--r--player/video.c1
3 files changed, 5 insertions, 5 deletions
diff --git a/player/command.c b/player/command.c
index 4d0473f4c2..ffe7a98261 100644
--- a/player/command.c
+++ b/player/command.c
@@ -1880,8 +1880,8 @@ static int mp_property_vd_imgparams(m_option_t *prop, int action, void *arg,
if (!vd)
return M_PROPERTY_UNAVAILABLE;
struct sh_video *sh = vd->header->video;
- if (vd->vf_input.imgfmt) {
- return property_imgparams(vd->vf_input, action, arg);
+ if (vd->vfilter->override_params.imgfmt) {
+ return property_imgparams(vd->vfilter->override_params, action, arg);
} else if (sh->disp_w && sh->disp_h) {
// Simplistic fallback for stupid scripts querying "width"/"height"
// before the first frame is decoded.
@@ -1976,7 +1976,7 @@ static int mp_property_aspect(m_option_t *prop, int action, void *arg,
}
case M_PROPERTY_GET: {
float aspect = -1;
- struct mp_image_params *params = &d_video->vf_input;
+ struct mp_image_params *params = &d_video->vfilter->override_params;
if (params && params->d_w && params->d_h) {
aspect = (float)params->d_w / params->d_h;
} else if (sh_video->disp_w && sh_video->disp_h) {
diff --git a/player/sub.c b/player/sub.c
index 00b2260c67..883ffa0dbf 100644
--- a/player/sub.c
+++ b/player/sub.c
@@ -34,6 +34,7 @@
#include "demux/demux.h"
#include "video/mp_image.h"
#include "video/decode/dec_video.h"
+#include "video/filter/vf.h"
#include "core.h"
@@ -92,7 +93,7 @@ static void update_subtitle(struct MPContext *mpctx, int order)
int obj = order ? OSDTYPE_SUB2 : OSDTYPE_SUB;
if (mpctx->d_video) {
- struct mp_image_params params = mpctx->d_video->vf_input;
+ struct mp_image_params params = mpctx->d_video->vfilter->override_params;
if (params.imgfmt)
sub_control(dec_sub, SD_CTRL_SET_VIDEO_PARAMS, &params);
}
diff --git a/player/video.c b/player/video.c
index b995ed2575..7679348243 100644
--- a/player/video.c
+++ b/player/video.c
@@ -366,7 +366,6 @@ static void filter_video(struct MPContext *mpctx, struct mp_image *frame,
return;
}
- mp_image_set_params(frame, &d_video->vf_input); // force csp/aspect overrides
vf_filter_frame(d_video->vfilter, frame);
filter_output_queued_frame(mpctx, false);
}