Turns out glib aborts on allocation failure, so this is pointless.
We'll just ignore Coverity warnings on such constructs.
This reverts commit d347809a82.
While it will probably not trigger, it should silence a Coverity
warning about the fail code path testing for NULLness before
freeing, where the buffer was already dereferenced. It seems
safest to keep that test, in case future goto fail statements
happen to have a NULL buffer there.
Coverity 1139851
The muxer is now able to include DVB sections in the transport stream.
The si-interval property will determine how often the SI tables are
muxed into the stream.
The section is handled by the mpeg-ts library. Below is a small example
that will include a Netork Information Table with a Network Name
descriptor in the stream.
GstMpegTsNIT *nit;
GstMpegTsDescriptor *descriptor;
GstMpegTsSection *section;
GstElement *mpegtsmux;
gst_mpegts_initialize ();
nit = gst_mpegts_section_nit_new ();
nit->actual_network = TRUE;
descriptor = gst_mpegts_descriptor_from_dvb_network_name ("Network name");
g_ptr_array_add (nit->descriptors, descriptor);
section = gst_mpegts_section_from_nit (nit);
// mpegtsmux should be retrieved from the pipeline
gst_mpegts_section_send_event (section, mpegtsmux);
gst_mpegts_section_unref (section);
Collectpads assumes that it can pass any buffer to the clip function
for adjustment, some of which are artificially injected - so don't
adjust global timestamp tracking there. Instead, only adjust the
buffer timestamps and use them directly in the collection function.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=698748
The prog-map property of mpegtsmux only allows you to group pids together in a program.
The program number set in the PAT/PMT tables cannot be set explicitly.
This patch will set the program number according to the prog-map.
If a program id of 0 is given, the first vacant program number starting from 1 will be used.
https://bugzilla.gnome.org/show_bug.cgi?id=697239
If a buffer was entirely clipped out (ie, it's out of the segment
entirely), we'll end up with a NULL buffer, which we don't want
to process/dereference.
prepare_func will allocate a new buffer to replace the original
one. Instead of using gst_buffer_replace (which causes an extra
refcount increment on the new buffer), we just unref the original
buffer.
https://bugzilla.gnome.org/show_bug.cgi?id=699786
A crash occured after pushing buffers and changing mpegtsmux state to
NULL/READ and then back to PLAYING/PAUSED.
The crash was caused by holding a dangling pointer in the MpegTsMux
program table.
Additionally stream headers were leaked when resetting the element:
mux->streamheader set to NULL in mpegtsmux_reset() before it's released
later in the same function.
Added a unit test: test_multiple_state_change
https://bugzilla.gnome.org/show_bug.cgi?id=689107