handle_p (GstSamiContext * sctx, const gchar ** atts)
{
int i;
+ const int str_size = 128;
if (atts != NULL) {
for (i = 0; (atts[i] != NULL); i += 2) {
&& (sctx->time1 == sctx->time2))
sctx->language_changed = TRUE;
else if (!sctx->current_language)
- sctx->current_language = (gchar*) malloc (128);
+ sctx->current_language = (gchar*) malloc (str_size);
if (key && !g_ascii_strcasecmp ("class", key) && value) {
- strcpy (sctx->current_language, value);
+ strncpy (sctx->current_language, value, str_size - 1);
if (sctx->desired_language == NULL) {
sctx->desired_language = g_strdup(value);
GST_LOG("no language list was found and desired lang was set to %s", sctx->desired_language);
new = g_new0 (GstLangStruct, 1);
new->language_code = (gchar*) malloc (strlen(value) + 1);
if (new->language_code && value)
- strcpy (new->language_code, value);
+ g_strlcpy (new->language_code, value, strlen(value) + 1);
new->language_key = (gchar*) malloc (strlen(key) + 1);
if (new->language_key && key)
- strcpy (new->language_key, key);
+ g_strlcpy (new->language_key, key, strlen(key) + 1);
sctx->lang_list = g_list_append (sctx->lang_list, new);
temp = g_list_nth_data (sctx->lang_list, i);
if (sctx->desired_language == NULL && key){
} else if (!g_ascii_strcasecmp ("i", name)) {
#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
if (sctx->current_language && sctx->desired_language &&
- !strcmp(sctx->current_language, sctx->desired_language))
+ !strcmp(sctx->current_language, sctx->desired_language)) {
#endif
g_string_append (sctx->buf, "<i>");
+#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
+ }
+#endif
sami_context_push_state (sctx, ITALIC_TAG);
} else if (!g_ascii_strcasecmp ("p", name)) {
#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
gst_query_parse_allocation (query, &caps, NULL);
if (caps) {
- vc->tbm_buffer_pool = gst_mm_buffer_pool_new(trans);
+ vc->tbm_buffer_pool = gst_mm_buffer_pool_new(GST_ELEMENT_CAST(trans));
GST_DEBUG("[%s]CREATING VIDEO_BUFFER_POOL",__FUNCTION__);
}
gst_video_convert_prepare_output_buffer (GstBaseTransform * trans,
GstBuffer *input, GstBuffer **outbuf)
{
- GstBuffer *out_buffer = NULL;
GstVideoConvert *vc = NULL;
GstVideoFilter *filter = GST_VIDEO_FILTER_CAST (trans);