vaapidecode: Fix buffer copy assertion

Don't try to copy the NULL buffer-codec_data.
This commit is contained in:
Sreerenj Balachandran 2015-10-12 14:13:03 +03:00
parent 0681da9670
commit 087e549c1e

View 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;
}