Bug 800564: Handle MJPEG decode errors r=abr

This commit is contained in:
Randell Jesup 2015-11-09 13:08:06 -05:00
parent 7be5c61b60
commit d63df758cf
2 changed files with 3 additions and 3 deletions

View File

@ -218,7 +218,7 @@ int MJPGToI420(const uint8* sample,
return 1;
}
}
return 0;
return ret ? 0 : -1;
}
#ifdef HAVE_JPEG
@ -380,7 +380,7 @@ int MJPGToARGB(const uint8* sample,
return 1;
}
}
return 0;
return ret ? 0 : -1;
}
#endif

View File

@ -313,7 +313,7 @@ int32_t VideoCaptureImpl::IncomingFrame(
videoFrameLength,
_rotateFrame,
&_captureFrame);
if (conversionResult < 0)
if (conversionResult != 0)
{
LOG(LS_ERROR) << "Failed to convert capture frame from type "
<< frameInfo.rawType << "to I420.";