summaryrefslogtreecommitdiff
path: root/libavfilter/vf_stereo3d.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-09-15 18:55:47 +0000
committerPaul B Mahol <onemda@gmail.com>2015-09-15 19:06:06 +0000
commiteeaf19cee981c5fcbc1f4d7e005444a5aa728288 (patch)
tree50387b8bbd7a2c7a9610a703a446c9176bd4b51d /libavfilter/vf_stereo3d.c
parent040ddd27bfca5c0427a0bb68ac1b45dc374cd699 (diff)
avfilter/vf_stereo3d: simplify blank calculations and check height
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_stereo3d.c')
-rw-r--r--libavfilter/vf_stereo3d.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c
index 02dc948744..b0deba3610 100644
--- a/libavfilter/vf_stereo3d.c
+++ b/libavfilter/vf_stereo3d.c
@@ -445,10 +445,12 @@ static int config_output(AVFilterLink *outlink)
s->out.row_right = s->height;
break;
case HDMI:
- if (s->in.height <= 720)
- s->blanks = 30;
- else
- s->blanks = 45;
+ if (s->height != 720 && s->height != 1080) {
+ av_log(ctx, AV_LOG_ERROR, "Only 720 and 1080 height supported\n");
+ return AVERROR(EINVAL);
+ }
+
+ s->blanks = s->height / 24;
s->out.height = s->height * 2 + s->blanks;
s->out.row_right = s->height + s->blanks;
break;