mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
fix and better comment gst_event_new_discontinuous. Nice memory leak there
Original commit message from CVS: fix and better comment gst_event_new_discontinuous. Nice memory leak there
This commit is contained in:
parent
1f5fa9cf82
commit
a68e0b8324
2 changed files with 7 additions and 5 deletions
|
@ -183,7 +183,10 @@ gst_event_new_seek (GstSeekType type, gint64 offset)
|
|||
* @format1: The format of the discont value
|
||||
* @...: more discont values and formats
|
||||
*
|
||||
* Allocate a new discontinuous event with the geven format/value pairs.
|
||||
* Allocate a new discontinuous event with the given format/value pairs. Note
|
||||
* that the values are of type gint64 - you may not use simple integers such
|
||||
* as "0" when calling this function, always cast them like "(gint64) 0".
|
||||
* Terminate the list with #GST_FORMAT_UNDEFINED.
|
||||
*
|
||||
* Returns: A new discontinuous event.
|
||||
*/
|
||||
|
@ -199,12 +202,12 @@ gst_event_new_discontinuous (gboolean new_media, GstFormat format1, ...)
|
|||
|
||||
va_start (var_args, format1);
|
||||
|
||||
while (format1) {
|
||||
while (format1 >= GST_FORMAT_UNDEFINED && count < 8) {
|
||||
|
||||
GST_EVENT_DISCONT_OFFSET (event, count).format = format1 & GST_SEEK_FORMAT_MASK;
|
||||
GST_EVENT_DISCONT_OFFSET (event, count).value = va_arg (var_args, gint64);
|
||||
|
||||
format1 = va_arg (var_args, GstSeekType);
|
||||
format1 = va_arg (var_args, GstFormat);
|
||||
|
||||
count++;
|
||||
}
|
||||
|
@ -313,4 +316,3 @@ gst_event_new_segment_seek (GstSeekType type, gint64 start, gint64 stop)
|
|||
|
||||
return event;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
G_BEGIN_DECLS
|
||||
|
||||
typedef enum {
|
||||
GST_FORMAT_UNDEFINED = 0,
|
||||
GST_FORMAT_UNDEFINED = 0, /* must be first in list */
|
||||
GST_FORMAT_DEFAULT = 1,
|
||||
GST_FORMAT_BYTES = 2,
|
||||
GST_FORMAT_TIME = 3,
|
||||
|
|
Loading…
Reference in a new issue