summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-26 15:54:58 +0200
committerwm4 <wm4@nowhere>2013-09-26 15:54:58 +0200
commit7eb13c4028f2eb9174f2f65d1cfc15e5186bfbbc (patch)
tree11b54dc8998ed8663b846a92a1c9fc3dcc66a4ad /video
parent0a0d7f43a5bc826b775d055b3bfb247e9c86bf65 (diff)
downloadmpv-7eb13c4028f2eb9174f2f65d1cfc15e5186bfbbc.tar.bz2
mpv-7eb13c4028f2eb9174f2f65d1cfc15e5186bfbbc.tar.xz
vd: remove some dead code
As of now, this function is called only after decoding a full, valid video frame, so the image parameters should be reliable.
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/video/decode/vd.c b/video/decode/vd.c
index 42244de209..9545226fb9 100644
--- a/video/decode/vd.c
+++ b/video/decode/vd.c
@@ -58,24 +58,14 @@ int mpcodecs_reconfig_vo(sh_video_t *sh, const struct mp_image_params *params)
sh->vf_reconfig_count++;
- if (!p.w || !p.h) {
- // ideally, this should be dead code
- mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Unknown size, using container size.\n");
- p.w = sh->disp_w;
- p.h = sh->disp_h;
- } else {
- sh->disp_w = p.w;
- sh->disp_h = p.h;
- }
+ sh->disp_w = p.w;
+ sh->disp_h = p.h;
mp_msg(MSGT_DECVIDEO, MSGL_V,
"VIDEO: %dx%d %5.3f fps %5.1f kbps (%4.1f kB/s)\n",
sh->disp_w, sh->disp_h, sh->fps, sh->i_bps * 0.008,
sh->i_bps / 1000.0);
- if (!sh->disp_w || !sh->disp_h)
- return -1;
-
mp_msg(MSGT_DECVIDEO, MSGL_V, "VDec: vo config request - %d x %d (%s)\n",
p.w, p.h, vo_format_name(p.imgfmt));
@@ -130,8 +120,8 @@ int mpcodecs_reconfig_vo(sh_video_t *sh, const struct mp_image_params *params)
else if (sh->stream_aspect != 0.0)
sh->aspect = sh->stream_aspect;
- int d_w = sh->disp_w;
- int d_h = sh->disp_h;
+ int d_w = p.w;
+ int d_h = p.h;
if (sh->aspect > 0.01) {
int new_w = d_h * sh->aspect;