mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 12:41:05 +00:00
vaapidecode: don't try flushing the decoder instance if we didn't create one yet
This otherwise results in unnecessary error messages. https://bugzilla.gnome.org/show_bug.cgi?id=734616
This commit is contained in:
parent
7ac501d026
commit
4ff4563a47
1 changed files with 6 additions and 0 deletions
|
@ -463,6 +463,9 @@ gst_vaapidecode_flush(GstVideoDecoder *vdec)
|
|||
GstVaapiDecode * const decode = GST_VAAPIDECODE(vdec);
|
||||
GstVaapiDecoderStatus status;
|
||||
|
||||
if (!decode->decoder)
|
||||
return TRUE;
|
||||
|
||||
/* If there is something in GstVideoDecoder's output adapter, then
|
||||
submit the frame for decoding */
|
||||
if (decode->current_frame_size) {
|
||||
|
@ -489,6 +492,9 @@ gst_vaapidecode_finish(GstVideoDecoder *vdec)
|
|||
GstVaapiDecode * const decode = GST_VAAPIDECODE(vdec);
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
|
||||
if (!decode->decoder)
|
||||
return GST_FLOW_OK;
|
||||
|
||||
if (!gst_vaapidecode_flush(vdec))
|
||||
ret = GST_FLOW_OK;
|
||||
|
||||
|
|
Loading…
Reference in a new issue