[FFmpeg-soc] [soc]: r4055 - libavfilter/vf_format.c
stefano
subversion at mplayerhq.hu
Mon Feb 16 21:50:29 CET 2009
Author: stefano
Date: Mon Feb 16 21:50:29 2009
New Revision: 4055
Log:
Make vf_format init() fails in case of an invalid format in input,
prevent unexpected behaviours.
Modified:
libavfilter/vf_format.c
Modified: libavfilter/vf_format.c
==============================================================================
--- libavfilter/vf_format.c Mon Feb 16 21:43:34 2009 (r4054)
+++ libavfilter/vf_format.c Mon Feb 16 21:50:29 2009 (r4055)
@@ -44,8 +44,7 @@ static av_cold int init(AVFilterContext
else {
if(sep-cur > 32) {
av_log(ctx, AV_LOG_ERROR, "format name too long\n");
- sep ++;
- continue;
+ return -1;
}
memcpy(name, cur, sep-cur);
name[sep-cur] = 0;
@@ -55,7 +54,7 @@ static av_cold int init(AVFilterContext
if(fmt == PIX_FMT_NONE) {
av_log(ctx, AV_LOG_ERROR, "unknown pixel format\n");
- continue;
+ return -1;
}
format->formats[fmt] = 1;
More information about the FFmpeg-soc
mailing list