mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
mpegtspacketizer: Remove g_return_if_fail
It's overkill for code only used by one element.
This commit is contained in:
parent
0ac7e16066
commit
69aab98702
1 changed files with 0 additions and 15 deletions
|
@ -1924,17 +1924,12 @@ mpegts_packetizer_new ()
|
||||||
void
|
void
|
||||||
mpegts_packetizer_push (MpegTSPacketizer * packetizer, GstBuffer * buffer)
|
mpegts_packetizer_push (MpegTSPacketizer * packetizer, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GST_IS_MPEGTS_PACKETIZER (packetizer));
|
|
||||||
g_return_if_fail (GST_IS_BUFFER (buffer));
|
|
||||||
|
|
||||||
gst_adapter_push (packetizer->adapter, buffer);
|
gst_adapter_push (packetizer->adapter, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
mpegts_packetizer_has_packets (MpegTSPacketizer * packetizer)
|
mpegts_packetizer_has_packets (MpegTSPacketizer * packetizer)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GST_IS_MPEGTS_PACKETIZER (packetizer), FALSE);
|
|
||||||
|
|
||||||
return gst_adapter_available (packetizer->adapter) >= 188;
|
return gst_adapter_available (packetizer->adapter) >= 188;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1945,9 +1940,6 @@ mpegts_packetizer_next_packet (MpegTSPacketizer * packetizer,
|
||||||
guint8 sync_byte;
|
guint8 sync_byte;
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
g_return_val_if_fail (GST_IS_MPEGTS_PACKETIZER (packetizer), FALSE);
|
|
||||||
g_return_val_if_fail (packet != NULL, FALSE);
|
|
||||||
|
|
||||||
packet->buffer = NULL;
|
packet->buffer = NULL;
|
||||||
while (gst_adapter_available (packetizer->adapter) >= 188) {
|
while (gst_adapter_available (packetizer->adapter) >= 188) {
|
||||||
sync_byte = *gst_adapter_peek (packetizer->adapter, 1);
|
sync_byte = *gst_adapter_peek (packetizer->adapter, 1);
|
||||||
|
@ -1972,9 +1964,6 @@ void
|
||||||
mpegts_packetizer_clear_packet (MpegTSPacketizer * packetizer,
|
mpegts_packetizer_clear_packet (MpegTSPacketizer * packetizer,
|
||||||
MpegTSPacketizerPacket * packet)
|
MpegTSPacketizerPacket * packet)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GST_IS_MPEGTS_PACKETIZER (packetizer));
|
|
||||||
g_return_if_fail (packet != NULL);
|
|
||||||
|
|
||||||
if (packet->buffer)
|
if (packet->buffer)
|
||||||
gst_buffer_unref (packet->buffer);
|
gst_buffer_unref (packet->buffer);
|
||||||
packet->buffer = NULL;
|
packet->buffer = NULL;
|
||||||
|
@ -1997,10 +1986,6 @@ mpegts_packetizer_push_section (MpegTSPacketizer * packetizer,
|
||||||
GstBuffer *sub_buf;
|
GstBuffer *sub_buf;
|
||||||
guint8 *data;
|
guint8 *data;
|
||||||
|
|
||||||
g_return_val_if_fail (GST_IS_MPEGTS_PACKETIZER (packetizer), FALSE);
|
|
||||||
g_return_val_if_fail (packet != NULL, FALSE);
|
|
||||||
g_return_val_if_fail (section != NULL, FALSE);
|
|
||||||
|
|
||||||
data = packet->data;
|
data = packet->data;
|
||||||
section->pid = packet->pid;
|
section->pid = packet->pid;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue