summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/mpjpegdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index 3429d1907a..dd31f87d69 100644
--- a/libavformat/mpjpegdec.c
+++ b/libavformat/mpjpegdec.c
@@ -260,8 +260,10 @@ static char* mpjpeg_get_boundary(AVIOContext* pb)
start = mime_type;
while (start != NULL && *start != '\0') {
start = strchr(start, ';');
- if (start)
- start = start+1;
+ if (!start)
+ break;
+
+ start = start+1;
while (av_isspace(*start))
start++;