OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc71fa3
)
avcodec/cuvid: Allow reinitialization of decoder
author
Philip Langdale
<philipl@overt.org>
Sat, 22 Oct 2016 21:31:41 +0000
(14:31 -0700)
committer
Philip Langdale
<philipl@overt.org>
Sat, 22 Oct 2016 21:57:00 +0000
(14:57 -0700)
In practice, this works fine.
libavcodec/cuvid.c
patch
|
blob
|
history
diff --git
a/libavcodec/cuvid.c
b/libavcodec/cuvid.c
index
27a4c30
..
24ade94
100644
(file)
--- a/
libavcodec/cuvid.c
+++ b/
libavcodec/cuvid.c
@@
-141,9
+141,11
@@
static int CUDAAPI cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* form
return 1;
if (ctx->cudecoder) {
- av_log(avctx, AV_LOG_ERROR, "re-initializing decoder is not supported\n");
- ctx->internal_error = AVERROR(EINVAL);
- return 0;
+ av_log(avctx, AV_LOG_TRACE, "Re-initializing decoder\n");
+ ctx->internal_error = CHECK_CU(cuvidDestroyDecoder(ctx->cudecoder));
+ if (ctx->internal_error < 0)
+ return 0;
+ ctx->cudecoder = NULL;
}
if (hwframe_ctx->pool && (