mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/xbmdec: remove dependancy on zero padding on input packet
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
103f9c261a
commit
73d820ee1e
|
@ -82,10 +82,10 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data,
|
|||
return ret;
|
||||
|
||||
// goto start of image data
|
||||
next = ptr + strcspn(ptr, "{");
|
||||
if (!*next)
|
||||
next = ptr + strcspn(ptr, "(");
|
||||
if (!*next)
|
||||
next = memchr(ptr, '{', avpkt->size);
|
||||
if (!next)
|
||||
next = memchr(ptr, '(', avpkt->size);
|
||||
if (!next)
|
||||
return AVERROR_INVALIDDATA;
|
||||
ptr = next + 1;
|
||||
|
||||
|
@ -95,7 +95,10 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data,
|
|||
for (j = 0; j < linesize; j++) {
|
||||
uint8_t val;
|
||||
|
||||
ptr += strcspn(ptr, "x$") + 1;
|
||||
while (ptr < end && *ptr != 'x' && *ptr != '$')
|
||||
ptr++;
|
||||
|
||||
ptr ++;
|
||||
if (ptr < end && av_isxdigit(*ptr)) {
|
||||
val = convert(*ptr++);
|
||||
if (av_isxdigit(*ptr))
|
||||
|
|
Loading…
Reference in New Issue