From 087e549c1e082545d0bc86fd202d200ab57e54fd Mon Sep 17 00:00:00 2001 From: Sreerenj Balachandran Date: Mon, 12 Oct 2015 14:13:03 +0300 Subject: vaapidecode: Fix buffer copy assertion Don't try to copy the NULL buffer-codec_data. --- gst/vaapi/gstvaapidecode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gst') 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; } -- cgit v1.2.1