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 && (
ctx->cuparseinfo.pExtVideoInfo = &ctx->cuparse_ext;
switch (avctx->codec->id) {
-#if CONFIG_H263_CUVID_DECODER
- case AV_CODEC_ID_H263:
- ctx->cuparseinfo.CodecType = cudaVideoCodec_MPEG4;
- break;
-#endif
#if CONFIG_H264_CUVID_DECODER
case AV_CODEC_ID_H264:
ctx->cuparseinfo.CodecType = cudaVideoCodec_H264;
DEFINE_CUVID_CODEC(hevc, HEVC)
#endif
-#if CONFIG_H263_CUVID_DECODER
-DEFINE_CUVID_CODEC(h263, H263)
-#endif
-
#if CONFIG_H264_CUVID_DECODER
DEFINE_CUVID_CODEC(h264, H264)
#endif