diff options
author | Julien Moutte <julien@moutte.net> | 2006-02-25 19:07:41 +0000 |
---|---|---|
committer | Julien Moutte <julien@moutte.net> | 2006-02-25 19:07:41 +0000 |
commit | 675a5afed05aa4a67f8eb1ac7ee4b6db96923a7e (patch) | |
tree | 07c36573a2f154805b4b1ec11c2d8d5387a0427f /ext/annodex/gstannodex.c | |
parent | 36e55fc8582b7c256ddf606ff096eafd10c237ab (diff) |
Fix a memleak in gst_cmml_track_list_add_clip.
Original commit message from CVS:
2006-02-25 Alessandro Decina <alessandro@nnva.org>
* ext/annodex/Makefile.am:
* ext/annodex/gstannodex.c:
* ext/annodex/gstcmmldec.c:
* ext/annodex/gstcmmlenc.c:
* ext/annodex/gstcmmlparser.c:
* ext/annodex/gstcmmlparser.h:
* ext/annodex/gstcmmlutils.c:
* tests/check/elements/cmmldec.c:
* tests/check/elements/cmmlenc.c:
Fix a memleak in gst_cmml_track_list_add_clip.
Handle overflows in clip's start and end times.
Add the "encoded" parameter to cmmldec and cmmlenc caps.
Do not parse junk at the end of a CMML preamble buffer.
Register a libxml error handler to not print stuff on stderr.
Check for bad clip start and end times in the testsuites.
Diffstat (limited to 'ext/annodex/gstannodex.c')
-rw-r--r-- | ext/annodex/gstannodex.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/annodex/gstannodex.c b/ext/annodex/gstannodex.c index a489a735..fa935f25 100644 --- a/ext/annodex/gstannodex.c +++ b/ext/annodex/gstannodex.c @@ -25,7 +25,9 @@ #include "config.h" #endif +#include <math.h> #include <gst/tag/tag.h> +#include "gstcmmlparser.h" #include "gstcmmlenc.h" #include "gstcmmldec.h" @@ -49,9 +51,9 @@ gst_annodex_granule_to_time (gint64 granulepos, gint64 granulerate_n, granulepos = keyindex + keyoffset; } - /* GST_SECOND / granulerate_n / granulerate_d */ + /* GST_SECOND / (granulerate_n / granulerate_d) */ granulerate = gst_util_uint64_scale (GST_SECOND, - granulerate_n, granulerate_d); + granulerate_d, granulerate_n); /* granulepos * granulerate */ res = gst_util_uint64_scale (granulepos, granulerate, 1); @@ -135,7 +137,6 @@ fail: static gboolean plugin_init (GstPlugin * plugin) { - gst_tag_register (GST_TAG_CMML_STREAM, GST_TAG_FLAG_META, GST_TYPE_CMML_TAG_STREAM, "cmml-stream", "annodex CMML stream tag", NULL); @@ -145,6 +146,8 @@ plugin_init (GstPlugin * plugin) gst_tag_register (GST_TAG_CMML_CLIP, GST_TAG_FLAG_META, GST_TYPE_CMML_TAG_CLIP, "cmml-clip", "annodex CMML clip tag", NULL); + gst_cmml_parser_init (); + if (!gst_cmml_enc_plugin_init (plugin)) return FALSE; |