GST_LOG_OBJECT (nvdec, "handle frame");
- if (nvdec->last_ret != GST_FLOW_OK) {
- GST_DEBUG_OBJECT (nvdec,
- "return last flow %s", gst_flow_get_name (nvdec->last_ret));
- gst_video_codec_frame_unref (frame);
- return nvdec->last_ret;
- }
-
/* initialize with zero to keep track of frames */
gst_video_codec_frame_set_user_data (frame, GUINT_TO_POINTER (0), NULL);
packet.flags |= CUVID_PKT_DISCONTINUITY;
nvdec->state = GST_NVDEC_STATE_PARSE;
+ nvdec->last_ret = GST_FLOW_OK;
if (!gst_cuda_result (CuvidParseVideoData (nvdec->parser, &packet)))
GST_WARNING_OBJECT (nvdec, "parser failed");
packet.flags = CUVID_PKT_ENDOFSTREAM;
nvdec->state = GST_NVDEC_STATE_PARSE;
+ nvdec->last_ret = GST_FLOW_OK;
if (nvdec->parser
&& !gst_cuda_result (CuvidParseVideoData (nvdec->parser, &packet)))
packet.flags = CUVID_PKT_ENDOFSTREAM;
nvdec->state = GST_NVDEC_STATE_PARSE;
+ nvdec->last_ret = GST_FLOW_OK;
if (nvdec->parser
&& !gst_cuda_result (CuvidParseVideoData (nvdec->parser, &packet)))