mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
tsmux: Fix default get_es_descrs_func
`tsmux_stream_default_get_es_descrs` is missing the `user_data` parameter and shouldn't be cast to `TsMuxStreamGetESDescriptorsFunc`. Prefer not casting at all to make sure we don't miss such an issue. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
This commit is contained in:
parent
2d72008361
commit
6053dd0d1b
3 changed files with 10 additions and 5 deletions
|
@ -306,8 +306,7 @@ gst_atsc_mux_create_new_stream (guint16 new_pid, TsMuxStreamType stream_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
tsmux_stream_set_get_es_descriptors_func (ret,
|
tsmux_stream_set_get_es_descriptors_func (ret,
|
||||||
(TsMuxStreamGetESDescriptorsFunc) gst_atsc_mux_stream_get_es_descrs,
|
gst_atsc_mux_stream_get_es_descrs, user_data);
|
||||||
user_data);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,6 +96,13 @@ struct TsMuxStreamBuffer
|
||||||
void *user_data;
|
void *user_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
tsmux_stream_get_es_descrs_default (TsMuxStream * stream,
|
||||||
|
GstMpegtsPMTStream * pmt_stream, gpointer user_data)
|
||||||
|
{
|
||||||
|
tsmux_stream_default_get_es_descrs (stream, pmt_stream);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tsmux_stream_new:
|
* tsmux_stream_new:
|
||||||
* @pid: a PID
|
* @pid: a PID
|
||||||
|
@ -238,8 +245,7 @@ tsmux_stream_new (guint16 pid, guint stream_type, guint stream_number)
|
||||||
stream->pcr_ref = 0;
|
stream->pcr_ref = 0;
|
||||||
stream->next_pcr = -1;
|
stream->next_pcr = -1;
|
||||||
|
|
||||||
stream->get_es_descrs =
|
stream->get_es_descrs = tsmux_stream_get_es_descrs_default;
|
||||||
(TsMuxStreamGetESDescriptorsFunc) tsmux_stream_default_get_es_descrs;
|
|
||||||
stream->get_es_descrs_data = NULL;
|
stream->get_es_descrs_data = NULL;
|
||||||
|
|
||||||
return stream;
|
return stream;
|
||||||
|
|
|
@ -76,7 +76,7 @@ typedef enum TsMuxStreamState TsMuxStreamState;
|
||||||
typedef struct TsMuxStreamBuffer TsMuxStreamBuffer;
|
typedef struct TsMuxStreamBuffer TsMuxStreamBuffer;
|
||||||
|
|
||||||
typedef void (*TsMuxStreamBufferReleaseFunc) (guint8 *data, void *user_data);
|
typedef void (*TsMuxStreamBufferReleaseFunc) (guint8 *data, void *user_data);
|
||||||
typedef void (*TsMuxStreamGetESDescriptorsFunc) (TsMuxStream *stream, GstMpegtsPMTStream *pmt_stream, void *user_data);
|
typedef void (*TsMuxStreamGetESDescriptorsFunc) (TsMuxStream *stream, GstMpegtsPMTStream *pmt_stream, gpointer user_data);
|
||||||
|
|
||||||
/* Stream type assignments
|
/* Stream type assignments
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue