Fix bug 104344 and add a missing free()
Original commit message from CVS: Fix bug 104344 and add a missing free()
This commit is contained in:
parent
9aa1cb1aaa
commit
7111e0092d
@ -909,7 +909,7 @@ id3_to_caps(struct id3_tag const *tag)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
struct id3_frame const *frame;
|
struct id3_frame const *frame;
|
||||||
id3_ucs4_t const *ucs4;
|
id3_ucs4_t const *ucs4;
|
||||||
id3_latin1_t *latin1;
|
id3_utf8_t *utf8;
|
||||||
GstProps *props;
|
GstProps *props;
|
||||||
GstPropsEntry *entry;
|
GstPropsEntry *entry;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
@ -965,13 +965,13 @@ id3_to_caps(struct id3_tag const *tag)
|
|||||||
if (strcmp(info[i].id, ID3_FRAME_GENRE) == 0)
|
if (strcmp(info[i].id, ID3_FRAME_GENRE) == 0)
|
||||||
ucs4 = id3_genre_name(ucs4);
|
ucs4 = id3_genre_name(ucs4);
|
||||||
|
|
||||||
latin1 = id3_ucs4_latin1duplicate(ucs4);
|
utf8 = id3_ucs4_utf8duplicate(ucs4);
|
||||||
if (latin1 == 0)
|
if (utf8 == 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
entry = gst_props_entry_new (name, GST_PROPS_STRING_TYPE, latin1);
|
entry = gst_props_entry_new (name, GST_PROPS_STRING_TYPE, utf8);
|
||||||
values = g_list_prepend (values, entry);
|
values = g_list_prepend (values, entry);
|
||||||
free(latin1);
|
free(utf8);
|
||||||
}
|
}
|
||||||
if (values) {
|
if (values) {
|
||||||
values = g_list_reverse (values);
|
values = g_list_reverse (values);
|
||||||
@ -1000,12 +1000,13 @@ id3_to_caps(struct id3_tag const *tag)
|
|||||||
ucs4 = id3_field_getfullstring(&frame->fields[3]);
|
ucs4 = id3_field_getfullstring(&frame->fields[3]);
|
||||||
g_assert(ucs4);
|
g_assert(ucs4);
|
||||||
|
|
||||||
latin1 = id3_ucs4_latin1duplicate(ucs4);
|
utf8 = id3_ucs4_utf8duplicate(ucs4);
|
||||||
if (latin1 == 0)
|
if (utf8 == 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
entry = gst_props_entry_new ("Comment", GST_PROPS_STRING_TYPE, latin1);
|
entry = gst_props_entry_new ("Comment", GST_PROPS_STRING_TYPE, utf8);
|
||||||
values = g_list_prepend (values, entry);
|
values = g_list_prepend (values, entry);
|
||||||
|
free(utf8);
|
||||||
}
|
}
|
||||||
if (values) {
|
if (values) {
|
||||||
values = g_list_reverse (values);
|
values = g_list_reverse (values);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user