vaapidecode: Fix buffer copy assertion
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>
Mon, 12 Oct 2015 11:13:03 +0000 (14:13 +0300)
committerSreerenj Balachandran <sreerenj.balachandran@intel.com>
Mon, 12 Oct 2015 11:13:03 +0000 (14:13 +0300)
Don't try to copy the NULL buffer-codec_data.

gst/vaapi/gstvaapidecode.c

index 438b954..2dc7c6c 100644 (file)
@@ -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;
 }