decoder: allow slices to be attached to pictures later.

This commit is contained in:
Gwenole Beauchesne 2012-01-24 10:21:45 +01:00
parent 74d3680381
commit dbba1f6107
2 changed files with 13 additions and 1 deletions

View file

@ -878,10 +878,18 @@ gst_vaapi_decoder_new_slice(
slice = create_slice(decoder, buf, buf_size);
if (!slice)
return NULL;
g_ptr_array_add(picture->slices, slice);
if (picture)
g_ptr_array_add(picture->slices, slice);
return slice;
}
void
gst_vaapi_decoder_free_slice(GstVaapiDecoder *decoder, GstVaapiSlice *slice)
{
destroy_slice(decoder, slice);
}
gboolean
gst_vaapi_decoder_decode_picture(
GstVaapiDecoder *decoder,

View file

@ -285,6 +285,10 @@ gst_vaapi_decoder_new_slice(
guint buf_size
) attribute_hidden;
void
gst_vaapi_decoder_free_slice(GstVaapiDecoder *decoder, GstVaapiSlice *slice)
attribute_hidden;
gboolean
gst_vaapi_decoder_decode_picture(
GstVaapiDecoder *decoder,