int i = 0;
/* copy pointer of tbm bo, stride, elevation */
- while (video_buffer->handle.bo[i] && i < MM_VIDEO_BUFFER_PLANE_MAX) {
+ while (i < MM_VIDEO_BUFFER_PLANE_MAX && video_buffer->handle.bo[i]) {
stream->bo[i] = tbm_bo_ref(video_buffer->handle.bo[i]);
i++;
}
__mmplayer_gst_create_video_filters(mm_player_t* player, GList** bucket)
{
gchar* video_csc = "videoconvert"; /* default colorspace converter */
- GList* element_bucket = *bucket;
+ GList* element_bucket = NULL;
MMPLAYER_RETURN_VAL_IF_FAIL(player && player->pipeline && player->pipeline->videobin, MM_ERROR_PLAYER_NOT_INITIALIZED);
return MM_ERROR_NONE;
ERROR: /* refer MMPLAYER_CREATE_ELEMENT */
+ g_list_free(element_bucket);
+
*bucket = NULL;
MMPLAYER_FLEAVE();
return MM_ERROR_PLAYER_INTERNAL;