Commit graph

6334 commits

Author SHA1 Message Date
Aurélien Zanelli
6d767a09d8 tsdemux: fix overflow of packet_length field of PESHeader
packet_length is defined as a guint16 in the PESHeader structure. This
definition match the specification. But since we add 6 bytes to the
packet_length value (length of start_code + stream_id + packet_length),
we can overflow the guint16 when the value in the PES header is greater
than 65529.
So use a guint32 instead of a guint16 to avoid overflow.

https://bugzilla.gnome.org/show_bug.cgi?id=736490
2014-09-12 11:27:52 +02:00
Belozorov Semen
00d0ff6c8e mpegpsmux: fix memory leak when converting H.264 avc to byte-stream format
Fix memory leak for input stream with caps "video/x-h264,stream-format=avc".

https://bugzilla.gnome.org/show_bug.cgi?id=736426
2014-09-11 14:28:23 +01:00
Tim-Philipp Müller
8990a61221 aiffmux: allocate byte writer on stack 2014-09-10 19:27:27 +01:00
Tim-Philipp Müller
c08c99b894 asfmux: allocate byte readers on the stack 2014-09-10 19:19:32 +01:00
Jesper Larsen
ff444dbf6d tsdemux: clear mutex resources in dispose
https://bugzilla.gnome.org/show_bug.cgi?id=736390
2014-09-10 18:53:47 +01:00
Tim-Philipp Müller
7b8bd35d18 Fix up one-element lists in template caps 2014-09-10 17:24:39 +01:00
Thiago Santos
e03e6c1571 Revert "dataurisrc: Remove unnecessary else if condition"
This reverts commit 3024ae9c38.

The *buf can be NULL or not depending if the caller of gst_pad_get_range
function provided or not a buffer.
2014-09-07 01:30:16 -03:00
Vineeth T M
d089c53704 aiffparse: Fix handling of 64 bit floating point data
In gst_aiff_parse_create_caps if and else-if conditions
are duplicated.

https://bugzilla.gnome.org/show_bug.cgi?id=736090
2014-09-05 10:45:57 +03:00
Vineeth T M
3024ae9c38 dataurisrc: Remove unnecessary else if condition
In gst_data_uri_src_create(), buf cannot be NULL, hence
else if (*buf != NULL) will be invalid so removing the
else if condition and adding a check to unreference buf
in else condition, just in case

https://bugzilla.gnome.org/show_bug.cgi?id=735861
2014-09-04 11:31:56 +03:00
Vineeth T M
76e099e5b9 dataurisrc: Make get_uri() threadsafe
https://bugzilla.gnome.org/show_bug.cgi?id=735861
2014-09-02 09:56:41 +03:00
Vineeth T M
114ee3355a zebrastripe: Refactor to remove duplicate code
gst_zebra_stripe_transform_frame_ip_planarY
gst_zebra_stripe_transform_frame_ip_YUY2
gst_zebra_stripe_transform_frame_ip_AYUV
all above 3 functions do the same functionality except for offset and pixel stride.
Hence moving the functionality to a single funtion.

https://bugzilla.gnome.org/show_bug.cgi?id=735032
2014-09-01 10:57:45 -03:00
Tim-Philipp Müller
d8b5675ddc dvbsuboverlay: remove code that can't be reached
If this code could ever be reached, it would leak
memory (CID 1231977), but gst_caps_get_features()
never returns NULL, so that can't happen.
2014-08-29 19:24:52 +01:00
Tim-Philipp Müller
ea7d5027a0 h264parse: fix up handling of input caps corner cases
Do more elaborate validation of the input caps: what fields
are required and/or not allowed. Don't assume AVC3 format
input without codec_data field is byte-stream format. Fix
up some now-unreachable code (CID 1232800).
2014-08-28 20:18:17 +01:00
Sebastian Dröge
25b5da587d rawparse: Reset negotiation state when going back to READY
After going back to READY we can accept new format settings again.
2014-08-28 11:37:56 +03:00
Blake Tregre
105b52e88a rfbsrc: Clamp out of bounds resolutions to prevent segfaults
https://bugzilla.gnome.org/show_bug.cgi?id=726801
2014-08-28 09:53:17 +03:00
Thiago Santos
9b6c8a48b4 h264parse: don't consider unknown stream-format as avc
It should try to use bytestream in these cases that the format
is set to _FORMAT_NONE as it seems that is what the 'else' clause
for bytestream can handle (by defaulting to _FORMAT_BYTESTREAM).
2014-08-25 13:37:57 -03:00
Thiago Santos
52257fe538 tsdemux: remove pads when resetting the element
Otherwise the pads will be there if it is restarted and the stream
can be a completely different one.

https://bugzilla.gnome.org/show_bug.cgi?id=734394
2014-08-19 00:02:33 -03:00
Vineeth T M
8caf5b7360 scenechange: fix crash on startup
gst_video_frame_map() was using the oldinfo GstVideoInfo
before it's been populated, resulting in a crash right
at the start.

https://bugzilla.gnome.org/show_bug.cgi?id=734763
2014-08-14 20:27:00 +01:00
Thibault Saunier
03031037fa tsdemux: Do not tweak segments on reverse playback
We can't compare the first buffer start and the segment start in that
case... playback is going backward!

https://bugzilla.gnome.org/show_bug.cgi?id=734445
2014-08-13 17:46:55 +02:00
Thiago Santos
eee178988a dvbsuboverlay: improve negotiation
Check if downstream supports overlay meta, if possible use it and
if not fallback to no-overlay caps

https://bugzilla.gnome.org/show_bug.cgi?id=733916
2014-08-11 11:35:01 -03:00
Thiago Santos
627b6ac461 dvbsuboverlay: always intersect with the filter in getcaps
Avoids returning unsupported caps to peers

https://bugzilla.gnome.org/show_bug.cgi?id=733916
2014-08-11 11:33:28 -03:00
Sebastian Rasmussen
8ee4e198cc inter: Unref bus after usage
gst_pipeline_get_bus() returns a reference to a bus that needs to
be unreferenced after usage.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734525
2014-08-11 10:02:44 +02:00
Sebastian Rasmussen
5d1fedd18e wrappercamerabinsrc: Unref elements after usage
gst_bin_get_by_name() and gst_bin_get_by_interface() both return
references to elements that need to be unreferenced after usage.

https://bugzilla.gnome.org/show_bug.cgi?id=734524
2014-08-10 14:17:55 +01:00
Sebastian Rasmussen
7731f3b36e interlace: fix caps refcounting
tcaps was unrefed when it shouldn't have been unrefed
in some cases.

https://bugzilla.gnome.org/show_bug.cgi?id=734531
2014-08-10 12:04:38 +01:00
Sebastian Rasmussen
128cbf4f57 dvbsuboverlay: Avoid leaking copy of caps object
gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
so creating a copy using gst_caps_copy() results in a reference leak.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734528
2014-08-10 11:56:56 +01:00
Sebastian Dröge
54c61efe44 mpegtspacketizer: Store PCR time/byte offsets in 64 bit integers
32 bit integers are going to overflow, especially the PCR offset to
the first PCR will overflow after about 159 seconds. This makes playback
of streams stop at 159 seconds as suddenly the timestamps are starting
again from 0. Now we have a few more years time until it happens again
and 64 bits are too small.
2014-08-05 11:45:55 +02:00
Sebastian Dröge
cb293af93d Revert "mpegtspacketizer: Convert PCR times to GStreamer times before comparing them against 500 * GST_MSECOND"
This reverts commit 9f186c6ab3.

That commit was actually completely wrong, nevermind.
2014-08-05 10:42:28 +02:00
Sebastian Dröge
9f186c6ab3 mpegtspacketizer: Convert PCR times to GStreamer times before comparing them against 500 * GST_MSECOND
Otherwise it will believe to detect PCR gaps already when there's a very small
gap of a few milliseconds, breaking playback of some files.
2014-08-05 10:37:41 +02:00
Thiago Santos
1685c45465 mpegtspacketizer: avoid timestamp overflows
Cause timing to break in the pipeline that can lead to a stall

https://bugzilla.gnome.org/show_bug.cgi?id=733837
2014-08-01 10:37:15 -03:00
Thiago Santos
a70764df5a wrappercamerabinsrc: do not give references to probes
They are kept until the probes are removed but they will never be
removed as the refcount of the element won't get to 0 because the
probes own references (cyclic refs). As the probes should only be
running as long as the element is running there is no need to
secure a ref for them.

Removes 3 leaked refs of wrappercamerabinsrc
2014-07-26 13:27:51 -03:00
Thiago Santos
455baef448 camerabin: use gst_object_ref to make it easier to track refs
Helps debugging
2014-07-26 12:46:01 -03:00
Thiago Santos
34b90db967 wrappercamerabinsrc: unref request pads
Do not forget to unref output-selector requested pads
2014-07-26 12:38:42 -03:00
Thiago Santos
2bfd106ef6 jpegparse: port to baseparse
https://bugzilla.gnome.org/show_bug.cgi?id=728356
2014-07-24 17:07:45 -03:00
Thiago Santos
65676a2f15 wrappercamerabinsrc: only flush buffers if renegotiation is needed
This avoid extra overhead when taking sequential pictures that woudln't
need renegotiation
2014-07-23 13:58:26 -03:00
Thiago Santos
19d5be4c3a camerabin: handle EOS on the pipeline
Make camerabin handle EOS to the pipeline to allow standard pipeline
close where an EOS is sent to the whole pipeline before setting it to NULL.
2014-07-23 13:58:26 -03:00
Mathieu Duponchelle
29dd215649 tsdemux: Do not scan for keyframe when in push mode.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733490
2014-07-22 15:51:21 +02:00
Mathieu Duponchelle
39d7d438c6 tsdemux: Do not scan for a keyframe in non-accurate mode.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733490
2014-07-22 15:50:59 +02:00
Thiago Santos
6c9fdb52e1 gdppay: remove obsolete code
Buffers have no caps in 1.0
2014-07-22 08:51:32 -03:00
Thiago Santos
ea7b843244 gdppay: put all sticky events in streamheader
Use the sticky events to compose the streamheader as they are the
ones that are persisted to config new pads linked. Instead of storing
them ourselves rely on the pad storage that already orders it for us

https://bugzilla.gnome.org/show_bug.cgi?id=732596
2014-07-22 08:51:32 -03:00
Sanjay NM
00b33e2068 pnmenc: Port PNM Encoder to use GstVideoEncoder Class
https://bugzilla.gnome.org/show_bug.cgi?id=731943
2014-07-22 06:19:48 -03:00
Sanjay NM
15a2da8ba7 pnmdec: Patch to handle max value
Convert the image values from 0-maxvalue to 0-255 when
'decoding' the pnm image

https://bugzilla.gnome.org/show_bug.cgi?id=731773
2014-07-21 17:23:47 -03:00
Thiago Santos
b39c01baa1 wrappercamerabinsrc: set src to ready when there are no pending buffers
Setting to ready will block waiting for buffers to be reclaimed, so flush
before setting to null to make sure no buffers are pending

https://bugzilla.gnome.org/show_bug.cgi?id=733072
2014-07-17 10:06:09 -03:00
Sebastian Rasmussen
e79e96e59d mxfmux: Avoid taking unnecessary ref
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733123
2014-07-16 16:47:21 +02:00
Nicolas Dufresne
362951b9ec wrappercamerabinsrc: Fix caps filter caps proxying
The notify signal is triggered when caps is changed. But instead of
proxying the fixed caps, we query for the caps. Hence, when we go to
READY state, we endup setting template caps on the proxied caps
filter instead of NULL, which leads to negoitation failure. Correctly
proxy NULL caps if this is the new caps. Fixes not negotiated error
when running in cheese. Also fix a leak of caps string in one of the
trace.

https://bugzilla.gnome.org/show_bug.cgi?id=732741
2014-07-11 11:05:08 -04:00
Nicolas Dufresne
5e4e572335 camerabin2: Flush downstream after setting src to READY
v4l2src requires all buffers to come back in order to cleanly stop
streaming. Flushing the pipline should force all buffers to come
back.

https://bugzilla.gnome.org/show_bug.cgi?id=732741
2014-07-10 18:34:21 -04:00
Sebastian Rasmussen
1f371ce855 aiffparse: Print invalid fourcc in error message in hex
Previously this was printed as characters which caused later processing
of the error message to sometimes warn about non-UTF-8 characters.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732715
2014-07-04 17:46:58 +01:00
Sebastian Dröge
aa6ee77297 mpegtspacketizer: Don't dereference NULL if we have no PCR yet
Can happen sometimes if the duration is requested before we
received enough data with a PCR.
2014-07-03 14:15:36 +02:00
Jan Schmidt
c103f7134b tsdemux: Add locking around mpegtspacketiser groups.
Otherwise occasionally DURATION queries can crash, if they happen at
the wrong moment.
2014-07-03 21:46:28 +10:00
Göran Jönsson
e050541f11 watchdog: Only create a new GSource if we have a main context
We can still get OOB events while stopping the watchdog element, and while
stopping it we destroy the main context.

Also let the GSource own a reference to the element for additional safety.

https://bugzilla.gnome.org/show_bug.cgi?id=732554
2014-07-01 19:41:36 +02:00
Gwenole Beauchesne
7d44a51bfe h264parse: fix collection of access units to preserve config headers.
Always use a GstAdapter when collecting access units (alignment="au")
in either byte-stream or avcC format. This is required to properly
preserve config headers like SPS and PPS when invalid or broken NAL
units are subsequently parsed.

More precisely, this fixes scenario like:
<SPS> <PPS> <invalid-NAL> <slice>

where we used to reset the output frame buffer when an invalid or
broken NAL is parsed, i.e. SPS and PPS NAL units were lost, thus
preventing the next slice unit to be decoded, should this also
represent any valid data.

https://bugzilla.gnome.org/show_bug.cgi?id=732203

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-01 16:26:48 +02:00
Gwenole Beauchesne
34c2cfd4dd h264parse: improve conditions for skipping NAL units.
Carefully track cases when skipping broken or invalid NAL units is
necessary. In particular, always allow NAL units to be processed
and let that gst_h264_parse_process_nal() function decide on whether
the current NAL needs to be dropped or not.

This fixes parsing of streams with SEI NAL buffering_period() message
inserted between SPS and PPS, or SPS-Ext NAL following a traditional
SPS NAL unit, among other cases too.

Practical examples from the H.264 AVC conformance suite include
alphaconformanceG, CVSE2_Sony_B, CVSE3_Sony_H, CVSEFDFT3_Sony_E
when parsing in stream-format=byte-stream,alignment=au mode.

https://bugzilla.gnome.org/show_bug.cgi?id=732203

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-01 16:26:48 +02:00
Gwenole Beauchesne
7bb6443bfb h264parse: introduce new state tracking variables.
Improve parser state tracking by introducing new flags reflecting
it: "got-sps", "got-pps" and "got-slice". This is an addition for
robustness purposes.

Older have_sps and have_pps variables are kept because they have
a different meaning. i.e. they are used for deciding on when to
submit updated caps or not, and rather mean "have new SPS/PPS to
be submitted?"

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-01 16:26:48 +02:00
Gwenole Beauchesne
5601c87598 h264parse: fix and optimize NAL collection function.
Use gst_h264_parser_identify_nalu_unchecked() to identify the next
NAL unit. We don't want to parse the full NAL unit, but only the
header bytes and possibly the first RBSP byte for identifying the
first_mb_in_slice syntax element.

Also fix check for failure when returning from that function. The
only success condition for that is GST_H264_PARSER_OK, so use it.

https://bugzilla.gnome.org/show_bug.cgi?id=732154

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-01 16:26:48 +02:00
Sebastian Dröge
d09f145ad7 intersubsrc: basesrc is already creating a pad for us, no need to do it twice 2014-06-29 22:20:51 +02:00
Sebastian Dröge
fec55b42c9 yadif: basetransform is creating pads for us already, don't do it twice 2014-06-29 22:19:07 +02:00
Sebastian Dröge
c15458b8cb intersubsink/src: Free channel string when finalizing the instance 2014-06-29 20:58:40 +02:00
Sebastian Dröge
78ab2cdffd vc1parse: Fix compiler warnings when compiling with G_DISABLE_ASSERT 2014-06-29 20:11:58 +02:00
Thiago Santos
256e843e30 dataurisrc: fix leak as gst_buffer_replace adds its own ref
So unref the buffer after that otherwise it leaks
2014-06-28 09:44:22 -03:00
Sebastian Dröge
fae814aef8 interaudiosrc: Fail in set_caps() if the caps can't be parsed 2014-06-28 10:43:43 +02:00
Thiago Santos
c5ef1bee73 audiovisualizer: fix caps leaks
Fix leak of caps event and of caps objects when setting caps on
sink and src pads
2014-06-27 17:27:25 -03:00
Gwenole Beauchesne
9bd186a960 codecparsers: h264: fix memory leak in GstH264PPS.
The gst_h264_parse_pps() function dynamically allocates the slice
group ids map array, so that needs to be cleared before parsing a
new PPS NAL unit again, or when it is no longer needed.

Likewise, a clean copy to the internal NAL parser state needs to be
performed so that to avoid a double-free corruption.

https://bugzilla.gnome.org/show_bug.cgi?id=707282

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-06-27 14:00:10 +02:00
Aurélien Zanelli
67df207280 codecparsers: h264: add support for Recovery Point SEI message.
The recovery point SEI message helps a decoder in determining if the
decoding process would produce acceptable pictures for display after
the decoder initiates random access or after the encoder indicates
a broken link in the coded video sequence.

This is not used in the h264parse element, but it could help debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=723380
2014-06-26 17:22:26 +02:00
Edward Hervey
22dfd9aef3 mpegts: Unify API : GstMpegts / gst_mpegts_ / GST_*_MPEGTS_
It was previously a mix and match of both variants, introducing just too much
confusion.

The prefix are from now on:
* GstMpegts for structures and type names (and not GstMpegTs)
* gst_mpegts_ for functions (and not gst_mpeg_ts_)
* GST_MPEGTS_ for enums/flags (and not GST_MPEG_TS_)
* GST_TYPE_MPEGTS_ for types (and not GST_TYPE_MPEG_TS_)

The rationale for chosing that is:
* the namespace is shorter/direct (it's mpegts, not mpeg_ts nor mpeg-ts)
* the namespace is one word under Gst
* it's shorter (yah)
2014-06-25 14:50:05 +02:00
Stefan Ringel
7c884374eb mpegts: change to GType and from gchar[] to gchar*
https://bugzilla.gnome.org/show_bug.cgi?id=730914
2014-06-24 16:06:01 +02:00
Edward Hervey
aaee4dc23b all: Don't declare variables in 'for' loops 2014-06-24 14:51:32 +02:00
Edward Hervey
48006e2136 compositor: Fix Makefile CFLAGS/LIBADD ordering
We want to use the libraries from -bad if/when present
2014-06-24 08:01:21 +02:00
Chris Bass
d9d4a91c62 h265parse: fix hvcC size check
In ISO/IEC 14496-15, the minimum size of a HEVCDecoderConfigurationRecord
(i.e., the contents of a hvcC box) is 23 bytes. However, the code in h265parse
checks that the size of this data is not less than 28 bytes, and it refuses to
accept caps if the check fails. The result is that standards-conformant streams
that don't carry any parameter sets in their hvcC boxes won't play.

https://bugzilla.gnome.org//show_bug.cgi?id=731783
2014-06-22 21:57:28 +01:00
Sebastian Dröge
6d3d06c91f Release 1.3.3 2014-06-22 19:22:28 +02:00
Sebastian Dröge
ae99043506 rawparse: Use the pad passed to us directly for default event handling 2014-06-22 14:21:35 +02:00
Justin Joy
9bd4a1b2e0 rawparse: default query should be forward on target pad
https://bugzilla.gnome.org/show_bug.cgi?id=731899
2014-06-22 14:21:35 +02:00
Tim-Philipp Müller
983eb6d28a tsdemux: fix up comment 2014-06-22 12:32:35 +01:00
Sebastian Dröge
59bdcd9ae3 tsdemux: Update comments to the new reality and remove unused variables 2014-06-21 16:55:05 +02:00
Mathieu Duponchelle
11fa711c34 compositor: Add a new compositor based on the new GstVideoAggregator base class
It is a replacement for videomixer with a similare API

Co-Authored by: Thibault Saunier <tsaunier@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=731919
2014-06-20 19:53:33 +02:00
Tim-Philipp Müller
7a6183802d pnm: link against libgstbase for GstAdapter
https://bugzilla.gnome.org/show_bug.cgi?id=730523
2014-06-18 10:13:10 +01:00
Sanjay NM
ed1a664171 pnmdec: Added PBM Support
https://bugzilla.gnome.org/show_bug.cgi?id=730523
2014-06-17 09:19:07 -03:00
Sanjay NM
310fe9f780 pnmdec: use GstVideoDecoder Class
https://bugzilla.gnome.org/show_bug.cgi?id=731400
2014-06-16 14:07:34 -03:00
Edward Hervey
1d1d469488 tsdemux: Don't overwrite original seek value
In accurate mode, we'll be using start to fill in the seek segment,
therefore don't overwrite it with the shifted seek position.

https://bugzilla.gnome.org/show_bug.cgi?id=731698
2014-06-16 07:42:37 +02:00
Edward Hervey
97b3382c80 mpegtspacketizer: live: handle pcr/dts discrepancies some more
When wrapover/reset occur, we end up with a small window of time where
the PTS/DTS will still be using the previous/next time-range.

In order not to return bogus values, return GST_CLOCK_TIME_NONE if the
PTS/DTS value to convert differs by more than 15s against the last seen
PCR

https://bugzilla.gnome.org/show_bug.cgi?id=674536
2014-06-13 11:52:15 +02:00
Edward Hervey
fdf9bdf929 mpegtspacketizer: Fix wraparound detection issue
Using 32bit unsigned values for corrected pcr/offset meant that we
potentially ended up in bogus values

Furthermore, refpcr - refpcroffset could end up being negative, which
PCRTIME_TO_GSTTIME() can't handle (and returned a massive positive value)
2014-06-13 11:48:39 +02:00
Mathieu Duponchelle
79c13b713e tsdemux: implement proper seeking for h264 streams.
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>

From a high level perspective, the new process for seeking h264
streams is as follows:

1) Rewind the stream until we find the first I-slice of a frame,
   and mark its offset in the stream.
2) Rewind the stream until we find SPS and PPS informations,
   to make sure the subsequent parser is up to date.
3) Accumulate optionnal SEI NAL units on the way.
4) Push the SPS, PPS and SEI units before the new keyframe.

https://bugzilla.gnome.org/show_bug.cgi?id=675132
2014-06-12 14:44:10 +02:00
Vincent Penquerc'h
174fc1015e aiffparse: bail out early when bytes per sample is not set
This should always be set for valid files when we get there,
and checking this avoids having ad hoc checks further down
in several places.

Coverity 1139698
2014-06-12 10:00:55 +01:00
Edward Hervey
6be887783e mpegtspacketizer: Use first group for handling reference pcr
If _set_current_pcr_offset gets called after a flushing seek, we ended
up using the current group for delta calculation ... whereas we should
be using the first group to calculate shifts.

Also add an early exit if there are no changes to apply
2014-06-11 09:41:50 +02:00
Edward Hervey
0020a9344d tsdemux: Remove unused variable
The seeksegment was no longer used since the switch to calculating segments
when we see data.
2014-06-10 14:50:10 +02:00
Edward Hervey
6043f7a578 mpegtspacketizer: Fix debug statement 2014-06-10 14:27:53 +02:00
Edward Hervey
8e28f335f4 mpegtspacketizer: Fix duration evaluation in push mode
When working in push mode, we need to be able to evaluate the duration
based on a single group of observations.

To do that we use the current group values
2014-06-10 14:27:01 +02:00
Edward Hervey
a822517ca9 mpegtspacketizer: Handle early PTS conversion
When handling the PTS/DTS conversion in new groups, there's a possibility
that the PTS might be smaller than the first PCR value observed, due to
re-ordering.

When using the current group, only apply the wraparound correction when we
are certain it is one (i.e. differs by more than a second) and not when it's
just a small difference (like out-of-order PTS).

https://bugzilla.gnome.org/show_bug.cgi?id=731088
2014-06-10 13:29:28 +02:00
Tim-Philipp Müller
c60f4ecd11 gdp: don't print already-freed string
CID 1221987
2014-06-09 10:10:01 +01:00
Edward Hervey
38cb5e00fe speed: Fix position query some more
Forgot to remove code in 16fd917632

CID #1139677
2014-06-09 10:57:32 +02:00
Edward Hervey
a2890e831b mpegtsdemux: Fix sticky event handling
When we receive sticky events from upstream, always return TRUE.

Fixes the issue where we receive custom sticky events (such as "uri")
and no pads are created yet.
2014-06-07 07:15:33 +02:00
Jan Schmidt
9538651a20 tsdemux: Remove extraneous extra parameter from check_pending_buffers function 2014-06-04 21:56:28 +10:00
Jan Schmidt
a86b3d032c mpegtspacketiser: Always initialise packet AFC flags and PCR fields
Also fix a slight typo in a comment about the smoothing algorithm
2014-06-04 21:56:00 +10:00
Jan Schmidt
842c4a3d2c tsdemux: Reset pending_ts on a discont, to re-measure initial timestamps
Since all the other timestamp tracking now gets reset on a discont,
it makes sense to wait for a PCR and timestamp buffers like when
playback first starts
2014-06-04 21:54:43 +10:00
Michael Olbrich
c9ae275c72 liveadder: handle gap buffer flag
Remove GAP flag unless both sides have gap data, ignore
incoming data if it is gap data.

https://bugzilla.gnome.org/show_bug.cgi?id=722397
2014-06-03 14:59:30 -04:00
Olivier Crête
037f277566 gdp: Fail gracefully if event can't be parsed
https://bugzilla.gnome.org/show_bug.cgi?id=731093
2014-06-02 21:44:00 -04:00
Edward Hervey
16fd917632 speed: make position query able to convert bytes to time
(same as 744c58d71b but for the
position query)

It was only querying in time, but then trying to use dead bytes
to time conversion code.

Coverity 1139677
2014-06-02 10:11:58 +02:00
Edward Hervey
e7a0d7d0ed mpegdemux: avoid crashing in pathological case
(Identical to commit 612cdeec80 which
was for resindvd)

When we'd see an unknown stream type, then a SDDS stream.
Then we'd get to the end of the switch with a NULL temp stream
pointer, and dereference it.

Coverity 1139708
2014-06-02 09:42:33 +02:00
Thiago Santos
0ae4bc74ba camerabin: fix structure handling in preview message
Avoid trying to modify the message structure as it isn't mutable.
Use a copy and post a new message if necessary.

Fixes failing tests.
2014-05-30 02:10:45 -03:00
Thiago Santos
32d8022820 tsbase: parse the mgt and add listed EIT/ETT pids to the known psi
This will make tsbase also parse the EITs and ETTs from ATSC streams that have
their pids reported on the MGT and post to the bus

https://bugzilla.gnome.org/show_bug.cgi?id=730435
2014-05-29 10:37:59 +02:00
Thiago Santos
c56a4d54b8 tsdemux: add/remove pads to flowcombiner differently due to streaming nature
Due to mpegts streaming nature some pads are created but are only added
later to the element. This can cause a scenario where the first stream
doesn't have an available decoder (while the next ones still pending
would have) and tsdemux will fail with not-linked as the first stream
added wouldn't be linked.

To avoid this tsdemux needs to add pads to the flowcombiner
when they are created instead of only when adding them to the
element.
2014-05-27 10:29:32 -03:00
Thiago Santos
b8d87c11ab mxfdemux: remove unread last_flow variable
it isn't necessary anymore and is already unused
2014-05-27 07:42:46 -03:00