Skip to content
Snippets Groups Projects
Commit 4029f05c authored by Philip Langdale's avatar Philip Langdale Committed by Timo Rothenpieler
Browse files

avcodec/cuvid: Always check for internal errors during parsing


The cuvid parser is basically undocumented, and although you'd
think that a failed callback would result in the overall parse
call returning an error, that is not true.

So, we end up silently trying to keep going as if nothing is wrong,
which doesn't achieve anything.

Solution: check the internal error flag every time.
Signed-off-by: default avatarPhilip Langdale <philipl@overt.org>
Signed-off-by: default avatarTimo Rothenpieler <timo@rothenpieler.org>
parent b257266e
No related branches found
No related tags found
No related merge requests found
...@@ -272,8 +272,13 @@ static int cuvid_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, ...@@ -272,8 +272,13 @@ static int cuvid_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
av_packet_unref(&filtered_packet); av_packet_unref(&filtered_packet);
if (ret < 0) { if (ret < 0) {
if (ctx->internal_error) goto error;
ret = ctx->internal_error; }
// cuvidParseVideoData doesn't return an error just because stuff failed...
if (ctx->internal_error) {
av_log(avctx, AV_LOG_ERROR, "cuvid decode callback error\n");
ret = ctx->internal_error;
goto error; goto error;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment