summaryrefslogtreecommitdiff
path: root/libavcodec/me_cmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/me_cmp.c')
-rw-r--r--libavcodec/me_cmp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/me_cmp.c b/libavcodec/me_cmp.c
index e2f9f84b05..cd05e63ffd 100644
--- a/libavcodec/me_cmp.c
+++ b/libavcodec/me_cmp.c
@@ -473,8 +473,9 @@ static int zero_cmp(MpegEncContext *s, const uint8_t *a, const uint8_t *b,
return 0;
}
-void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type)
+int ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type)
{
+ int ret = 0;
int i;
memset(cmp, 0, sizeof(void *) * 6);
@@ -533,9 +534,13 @@ void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type)
#endif
default:
av_log(NULL, AV_LOG_ERROR,
- "internal error in cmp function selection\n");
+ "invalid cmp function selection\n");
+ ret = -1;
+ break;
}
}
+
+ return ret;
}
#define BUTTERFLY2(o1, o2, i1, i2) \