summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-21 09:59:58 +0100
committerwm4 <wm4@nowhere>2014-11-21 09:59:58 +0100
commit86b521f7dfac8aa6a8edf030ce8fe987fb13a104 (patch)
tree6f1465728ddae55cf71d89c699b2aaf4d6cc3f6b
parente082c2c3dfced1cd20d7c1cb7ee7a661dffc8686 (diff)
downloadmpv-86b521f7dfac8aa6a8edf030ce8fe987fb13a104.tar.bz2
mpv-86b521f7dfac8aa6a8edf030ce8fe987fb13a104.tar.xz
Silence some Coverity warnings
None of this really matters.
-rw-r--r--common/encode_lavc.c1
-rw-r--r--misc/bstr.c2
-rw-r--r--stream/stream_pvr.c1
-rw-r--r--video/filter/vf_rotate.c2
4 files changed, 4 insertions, 2 deletions
diff --git a/common/encode_lavc.c b/common/encode_lavc.c
index 8877033f8d..92af771d61 100644
--- a/common/encode_lavc.c
+++ b/common/encode_lavc.c
@@ -1145,6 +1145,7 @@ void encode_lavc_fail(struct encode_lavc_context *ctx, const char *format, ...)
va_list va;
va_start(va, format);
mp_msg_va(ctx->log, MSGL_ERR, format, va);
+ va_end(va);
if (ctx->failed)
return;
ctx->failed = true;
diff --git a/misc/bstr.c b/misc/bstr.c
index 7db7015e1c..bb8446d254 100644
--- a/misc/bstr.c
+++ b/misc/bstr.c
@@ -277,7 +277,7 @@ int bstr_decode_utf8(struct bstr s, struct bstr *out_next)
s.start++; s.len--;
if (codepoint >= 128) {
int bytes = bstr_parse_utf8_code_length(codepoint);
- if (bytes < 0 || s.len < bytes - 1)
+ if (bytes < 1 || s.len < bytes - 1)
return -1;
codepoint &= 127 >> bytes;
for (int n = 1; n < bytes; n++) {
diff --git a/stream/stream_pvr.c b/stream/stream_pvr.c
index 6fa0b93926..50a8ee5cba 100644
--- a/stream/stream_pvr.c
+++ b/stream/stream_pvr.c
@@ -1573,6 +1573,7 @@ pvr_stream_open (stream_t *stream)
if (ioctl (pvr->dev_fd, VIDIOC_G_EXT_CTRLS, &ctrls) < 0)
{
MP_ERR(pvr, "%s device do not support MPEG input.\n", LOG_LEVEL_ENCODER);
+ pvr_uninit (pvr);
return STREAM_ERROR;
}
diff --git a/video/filter/vf_rotate.c b/video/filter/vf_rotate.c
index 579c3ea24a..9f0c60dd44 100644
--- a/video/filter/vf_rotate.c
+++ b/video/filter/vf_rotate.c
@@ -47,7 +47,7 @@ static int lavfi_reconfig(struct vf_instance *vf,
struct vf_priv_s *p = vf_lw_old_priv(vf);
if (p->angle == 4) { // "auto"
int r = in->rotate;
- if (r < 0 || (r % 90) != 0) {
+ if (r < 0 || r >= 360 || (r % 90) != 0) {
MP_ERR(vf, "Can't apply rotation of %d degrees.\n", r);
return -1;
}