Merge pull request #10726 from oleg0421/rdpecam_client_mjpeg_fix
RDPECAM client MJPEG decoder fix to skip corrupted frames
This commit is contained in:
commit
bbc27d53db
@ -289,6 +289,10 @@ static BOOL ecam_init_mjpeg_decoder(CameraDeviceStream* stream)
|
|||||||
stream->avContext->width = stream->currMediaType.Width;
|
stream->avContext->width = stream->currMediaType.Width;
|
||||||
stream->avContext->height = stream->currMediaType.Height;
|
stream->avContext->height = stream->currMediaType.Height;
|
||||||
|
|
||||||
|
/* AV_EF_EXPLODE flag is to abort decoding on minor error detection,
|
||||||
|
* return error, so we can skip corrupted frames, if any */
|
||||||
|
stream->avContext->err_recognition |= AV_EF_EXPLODE;
|
||||||
|
|
||||||
if (avcodec_open2(stream->avContext, avcodec, NULL) < 0)
|
if (avcodec_open2(stream->avContext, avcodec, NULL) < 0)
|
||||||
{
|
{
|
||||||
WLog_ERR(TAG, "avcodec_open2 failed");
|
WLog_ERR(TAG, "avcodec_open2 failed");
|
||||||
|
Loading…
Reference in New Issue
Block a user