codecparsers: h264: Use g_slice instead of g_malloc in nal_parser_new

This commit is contained in:
Thibault Saunier 2011-09-06 21:29:28 -03:00
parent 8b268bd49d
commit 949ba4e895
2 changed files with 2 additions and 2 deletions

View file

@ -1127,7 +1127,7 @@ gst_h264_nal_parser_new (void)
{
GstH264NalParser *nalparser;
nalparser = g_malloc0 (sizeof (GstH264NalParser));
nalparser = g_slice_new0 (GstH264NalParser);
GST_DEBUG_CATEGORY_INIT (h264_parser_debug, "codecparsers_h264", 0,
"h264 parser library");

View file

@ -145,7 +145,7 @@ GST_START_TEST (test_h264_parse_slice_dpa)
assert_equals_int (res, GST_H264_PARSER_OK);
assert_equals_int (nalu.type, GST_H264_NAL_SLICE_DPA);
g_free (parser);
g_slice_free (GstH264NalParser, parser);
}
GST_END_TEST;