summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>2015-10-12 14:13:03 +0300
committerSreerenj Balachandran <sreerenj.balachandran@intel.com>2015-10-12 14:13:03 +0300
commit087e549c1e082545d0bc86fd202d200ab57e54fd (patch)
tree8dd325f356205c2ca64443d309709c4857d4d259 /gst
parent0681da967064e15fa5224c1e04a13ac3c5de23cf (diff)
downloadgst-vaapi-087e549c1e082545d0bc86fd202d200ab57e54fd.tar.gz
vaapidecode: Fix buffer copy assertion
Don't try to copy the NULL buffer-codec_data.
Diffstat (limited to 'gst')
-rw-r--r--gst/vaapi/gstvaapidecode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c
index 438b9540..2dc7c6ca 100644
--- a/gst/vaapi/gstvaapidecode.c
+++ b/gst/vaapi/gstvaapidecode.c
@@ -147,7 +147,8 @@ copy_video_codec_state (const GstVideoCodecState * in_state)
state->ref_count = 1;
state->info = in_state->info;
state->caps = gst_caps_copy (in_state->caps);
- state->codec_data = gst_buffer_copy_deep (in_state->codec_data);
+ if (in_state->codec_data)
+ state->codec_data = gst_buffer_copy_deep (in_state->codec_data);
return state;
}