Commit 5ad7967e authored by David R Robison's avatar David R Robison Committed by Rémi Denis-Courmont

mjpeg: work around broken MIME separators in crappy firmwares

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 6ef4ee0f
......@@ -508,8 +508,13 @@ static int MimeDemux( demux_t *p_demux )
}
}
if( !strncmp( p_sys->psz_separator, (char *)(p_sys->p_peek + i + 2),
strlen( p_sys->psz_separator ) ) )
/* Handle old and new style of separators */
if (!strncmp(p_sys->psz_separator, (char *)(p_sys->p_peek + i + 2),
strlen( p_sys->psz_separator ))
|| ((strlen(p_sys->psz_separator) > 4)
&& !strncmp(p_sys->psz_separator, "--", 2)
&& !strncmp(p_sys->psz_separator, (char *)(p_sys->p_peek + i),
strlen( p_sys->psz_separator))))
{
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment