Commit graph

16614 commits

Author SHA1 Message Date
Jan Schmidt
db0eddb10f qtmux: Remove bogus check in atom_stsc_add_new_entry()
Remove an old check from atom_stsc_add_new_entry() that
extends the last entry in the STSC if the samples per chunk
matches, as the new interleave merging logic requires that
the final entry by updateable. There's already code
below which simply merges the final entry into the previous
one when needed, so rely on that instead.

Fixes asserts like:

ERROR:atoms.c:2940:atom_stsc_update_entry: assertion failed:
(atom_array_index (&stsc->entries, len - 1).first_chunk == first_chunk)
2017-01-03 01:34:02 +11:00
Seungha Yang
65c5d6d080 qtdemux: Fix key_time in gst_qtdemux_adjust_seek()
time in segment should be PTS based (not DTS).

https://bugzilla.gnome.org/show_bug.cgi?id=765498
2017-01-03 01:34:02 +11:00
Jan Schmidt
389dd4e3d0 splitmuxsrc: Pass seek flags when activating.
Pass all seek flags when activating a part
based on a seek, so that SNAP flags are preserved.
2017-01-03 01:34:02 +11:00
Jan Schmidt
6a16f8ef2e splitmux: Fix a small race in the splitmuxsrc
Make sure the state of the parser is set to
collecting streams before chaining up to the
parent change_state() method, to close a
small window that can cause playback to
never commence.
2017-01-03 01:34:02 +11:00
Edward Hervey
3a4d4dcd27 check: Remove dead code 2017-01-02 15:06:33 +01:00
Tim-Philipp Müller
eb5ee5b7a3 multifilesink: refactor max_files handling a bit
Use GQueue instead of a GSList so we don't have to traverse
the whole list to append something every time. And it also
keeps track of the number of items in it for us.

Add a function to add filenames to the list of old files and
use it in more places, so that memory doesn't build up in
other modes either if no max_files limit is specified.

https://bugzilla.gnome.org/show_bug.cgi?id=766991
2016-12-31 09:58:40 +00:00
Ursula Maplehurst
a10c1cc060 multifilesink: don't leak memory when no max-files limit is set
Technically we weren't leaking the memory, just storing it internally
and never using it until the element is freed. But we'd still use more
and more memory over time, so this is not good over longer periods
of time. Only keep track of files if there's actually a limit set,
so that we will prune the list from time to time.

https://bugzilla.gnome.org/show_bug.cgi?id=766991
2016-12-31 09:58:28 +00:00
Mark Nauwelaerts
e6a251e9c0 matroskademux: adjust segment stop for KEY_UNIT negative rate seeking 2016-12-29 12:48:56 +01:00
Mark Nauwelaerts
867ce71922 qtdemux: implement pull mode SNAP flag seeking 2016-12-29 12:48:56 +01:00
Mark Nauwelaerts
494f4beb40 avidemux: tweak KEY_UNIT SNAP seek handling
Previously, seeking to position y where y is (strictly) within a keyframe
would seek to that keyframe both with SNAP_BEFORE and SNAP_AFTER,
where the latter is now adjusted to really snap to the next keyframe.
2016-12-29 12:48:50 +01:00
Mark Nauwelaerts
3362dceb25 avidemux: correctly perform pull mode KEY_UNIT seeking
Rather amazingly (and equally unnoticed), keyunit seeking resulted in segments
where start != time (which is bogus for simple avi timeline).  So, properly
adjust the segment (start) rather than fiddling with segment time (only).
2016-12-28 13:59:30 +01:00
Mark Nauwelaerts
002cfd00b7 avidemux: restore considering of pull mode KEY_UNIT seeking
... by using the original seek event's flags rather than the corresponding
segment flags, which do not have such counterpart flags (and
do no longer have them covertly sneaking in nowadays).
2016-12-28 13:59:07 +01:00
Nicola Murino
c950672809 matroskamux: only drop actual streamheader buffers with xiph codecs
With Xiph codecs the stream header buffers are both in the caps and are
usually also at the beginning of each input stream, but it's perfectly
possible that the input stream does not have the stream header buffers
inline in the data. Matroskamux would drop the first N buffers assuming
they're stream headers, but this meant it would drop actual payload data
when the stream didn't contain the stream headers inline. Fix this by
only dropping leading buffers if they're flagged as stream headers. This
fixes issues with streams that are being tapped into after streaming
has started.

https://bugzilla.gnome.org/show_bug.cgi?id=749098
2016-12-21 17:02:57 +00:00
Nicola Murino
8fe478c8a7 matroskamux: adjust unit test to modified behaviour
Now matroskamux mark all packets of audio-only streams as keyframes so
in test_block_group after pushing the test audio data 4 buffers are produced
and not more 2. The last buffer is the original data and must match with what
pushed. The remaining ones are matroskamux headers

https://bugzilla.gnome.org/show_bug.cgi?id=754696
2016-12-21 16:58:42 +00:00
Nicola Murino
38265ee1a5 matroskamux: mark all packets of audio-only streams as keyframes
This helps with streaming audio-only streams via multifdsink,
tcpserversink and such.

https://bugzilla.gnome.org/show_bug.cgi?id=754696
2016-12-20 23:35:00 +00:00
Nicola Murino
92626d4085 matroskamux: add G722 audio support
https://bugzilla.gnome.org/show_bug.cgi?id=746574
2016-12-20 12:49:04 +02:00
Wonchul Lee
c7e23476c4 updsrc: Add to join multiple multicast interfaces
https://bugzilla.gnome.org/show_bug.cgi?id=776030
2016-12-19 10:50:14 +02:00
Tim-Philipp Müller
8ad0baccc2 rtpklvdepay: add the SPARSE flag to the outgoing stream-start event 2016-12-18 12:00:38 +00:00
Reynaldo H. Verdejo Pinochet
264be35e3c rtpmanager: place content before Since-version API marker
Avoids confusing the parser
2016-12-14 14:38:38 -08:00
Reynaldo H. Verdejo Pinochet
6c8c9a6492 shout2: fix 404 in package origin 2016-12-14 14:16:53 -08:00
Sebastian Dröge
76c007dd25 qtdemux: Check if we have enough data available when parsing edit lists
Also consume the data entry by entry to get complicated indexing out of
the code.

https://bugzilla.gnome.org/show_bug.cgi?id=776107
2016-12-14 21:48:24 +02:00
Víctor Manuel Jáquez Leal
6ec3cc70b2 v4l2object: Don't check size in a non-list value
After commit 1ea9735a I see these error while using the webcam
integrated in my laptop:

GStreamer-CRITICAL **: gst_value_list_get_size: assertion 'GST_VALUE_HOLDS_LIST (value)' failed

The issue is gst_v4l2src_value_simplify() was doing its job of
generating a single value, rather than the original list. That why,
when getting the list size, a critical warning was raised.

This patch takes advantage of the compiler optimizations to verify
first if the list was simplified, thus use it directly, otherwise,
if it is a list, verify its size.

https://bugzilla.gnome.org/show_bug.cgi?id=776106
2016-12-14 19:22:36 +01:00
Havard Graff
0a81f71df5 tests/jitterbuffer: Major refactoring and cleanups
* Changed PCMU->TEST for common macros
* Changed verify-functions (lost & rtx) into macros.
* Remove option to add marker-bit for test-buffers (not used anywhere)
* Add new push_test_buffer function that makes sure there are correlation
  between dts and the time on the clock. (classic test-mistake)
* Established a generic starting-point for tests with the
  construct_deterministic_initial_state function and use it where
  applicable, which removes lots of "boilerplate" everywhere.
* Add basic lost-event test
* Remove as much "magic constants" as possible.
* Remove 3 tests that no longer are testing anything that others don't,
  and was completely unmaintainable.
* Remove unnecessary use of the testclock
* Verify each test is testing what it actually says it does (and modify
  where it doesn't)

In general, make the tests much smaller, better, more maintainable and
readable.

https://bugzilla.gnome.org/show_bug.cgi?id=774409
2016-12-14 15:00:37 +02:00
Tim-Philipp Müller
7446996b2a Remove generated .spec file
Likely extremely bitrotten, and we should not ship this anyway.
2016-12-14 09:57:37 +00:00
Sebastian Dröge
35748dc8f2 qtdemux: Check that the XiTh size is big enough
https://bugzilla.gnome.org/show_bug.cgi?id=775794
2016-12-14 10:17:41 +02:00
Heekyoung Seo
f7c033f4ec qtdemux: Check node length of video sample description
Add check for node length of video sample description and its fields and
for the XiTh atom.

Also unify the code a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=775794
2016-12-14 10:17:41 +02:00
Heekyoung Seo
a5bfaf8a79 qtdemux: Enable xvid/mp2 codec support
Add support for xvid video and mp2 audio, add m2v1 fourcc.

https://bugzilla.gnome.org/show_bug.cgi?id=775794
2016-12-14 10:17:23 +02:00
Sebastian Dröge
63938ef730 gst: Don't declare variables inside the for loop header
This is a C99 feature.
2016-12-13 22:32:46 +02:00
Sebastian Dröge
fe2ae2c0f7 scaletempo: Ensure to reinit buffers whenever they were not allocated yet
That is, whenever we go through start/stop we have to ensure that on the
next opportunity the buffers are reallocated again. Otherwise the
buffers might be NULL because the element was reused with the same
configuration as before (i.e. set_caps() wouldn't have reinited the
buffers).

https://bugzilla.gnome.org/show_bug.cgi?id=775898
2016-12-11 13:27:27 +02:00
Tim-Philipp Müller
866fefbf5a docs: design: remove, moved to gst-docs 2016-12-10 12:52:18 +00:00
Thibault Saunier
b87e5b9c5e meson: Support building without Gst debug 2016-12-09 17:51:31 -03:00
Sebastian Dröge
524e43e118 flxdec: Only send SEGMENT events after CAPS
I.e., don't just forward the event but delay it if we don't have caps on
the srcpad yet.
2016-12-09 17:55:39 +02:00
Sebastian Dröge
a08e72547d flxdec: Unref and unmap buffers in all code paths as needed
https://bugzilla.gnome.org/show_bug.cgi?id=775888
2016-12-09 17:49:40 +02:00
Arun Raghavan
1ea9735afb v4l2object: Don't set empty interlace-mode list
If for some reason we fail to probe formats (all try_fmt calls fail, for
example), this is not a critical error, but we end up with an empty list
of interlace modes. This causes all subsequent negotiation to fail.

This patch fixes interlace-mode setting to be skipped if we failed to
detect any.

https://bugzilla.gnome.org/show_bug.cgi?id=775702
2016-12-08 10:13:39 +05:30
Garima Gaur
c3cdae4d6e monoscope: Unref allocation query after finished with it
https://bugzilla.gnome.org/show_bug.cgi?id=775752
2016-12-07 14:20:34 +02:00
Sebastian Dröge
96aaf889af flxdec: Allocate 0-initialized memory for the decoded frame
Otherwise we might leak arbitrary information from the uninitialized
memory if not every pixel is written.

https://scarybeastsecurity.blogspot.gr/2016/12/1days-0days-pocs-more-gstreamer-flic.html
2016-12-06 07:48:47 +02:00
Matt Staples
bc2adef550 rtspsrc: Fix session cleanup when handling redirect on PLAY
Redirect on PLAY wasn't doing the necessary session cleanup. Fixed by
removing code from gst_rtspsrc_send that changed the state varable upon
encountering a redirect. Better to let the redirect handlers in
gst_rtspsrc_retrieve_sdp and gst_rtspsrc_play do their own
state-dependent cleanup.

https://bugzilla.gnome.org/show_bug.cgi?id=775543
2016-12-05 18:23:31 +02:00
Aleix Conchillo Flaque
bc9f06f37b rtspsrc: always send teardown request
Allow CMD_CLOSE to cancel all commands not only CMD_PAUSE
and ignore CMD_WAIT while closing.

https://bugzilla.gnome.org/show_bug.cgi?id=748360
2016-12-05 11:32:43 +02:00
Edward Hervey
757ce9791d Automatic update of common submodule
From f980fd9 to 39ac2f5
2016-12-03 08:19:27 +01:00
Edward Hervey
e5158ca496 jitterbuffer: Don't leak duplicate items
When providing items with a seqnum, there is a (very small) probability
that an element with the same seqnum already exists. Don't forget
to free that item if it wasn't inserted.

And avoid returning undefined values when dealing with duplicate items
2016-12-02 09:01:57 +01:00
Edward Hervey
50bb6630f5 qtdemux: Sanitize unknown codec caps
We might have non-printable characters in the unknown fourcc, replace
them with '_', in the same way we do it for unknown tags.
2016-12-02 08:52:06 +01:00
Sebastian Dröge
9a4b1e9cdc avidemux: Free vprp chunk also if it existed but we made no use of it
https://bugzilla.gnome.org/show_bug.cgi?id=775479
2016-12-01 20:04:28 +02:00
Sebastian Dröge
7d6cf17498 matroskademux: Fix memory leak when parsing attachments
gst_tag_image_data_to_image_sample() does not take ownership of the
passed memory, so don't set it to NULL to allow us to free it later.

https://bugzilla.gnome.org/show_bug.cgi?id=775472
2016-12-01 17:38:33 +02:00
Sebastian Dröge
d3bc50bc8f matroskademux: Unify zlib/bzip2 decompress loops with the ones from qtdemux
Especially, simplify the code a bit.
2016-12-01 14:56:18 +02:00
Sebastian Dröge
6939399e96 qtdemux: Increase inflate buffer in bigger steps
1024 bytes is quite small, let's do 4096 bytes (or one page).
Also remove redundant if, we're always in that case when getting here.
2016-12-01 14:44:26 +02:00
Sebastian Dröge
b79655d3c9 qtdemux: Ensure that size of the pasp atom is as much as we need
https://bugzilla.gnome.org/show_bug.cgi?id=775455
2016-12-01 14:30:49 +02:00
Sebastian Dröge
d46cc8df6c qtdemux: Free compressed moov node and it's corresponding decompressed data
https://bugzilla.gnome.org/show_bug.cgi?id=775455
2016-12-01 14:30:10 +02:00
Sebastian Dröge
b4d6b2af8e qtdemux: Check size of compressed MOOV header against available data
And actually read the size of the cmvd atom from the right position.

https://bugzilla.gnome.org/show_bug.cgi?id=775455
2016-12-01 14:29:21 +02:00
Sebastian Dröge
5e4883094b qtdemux: Fix zlib inflate loop
Handle errors cleanly, deallocate all memory and return the actual size
of the inflated data.

https://bugzilla.gnome.org/show_bug.cgi?id=775455
2016-12-01 14:27:55 +02:00
Sebastian Dröge
87a2c140ca aacparse: Make sure we have enough data in the codec_data to be able to parse it
Also error out cleanly if mapping the buffer failed.

https://bugzilla.gnome.org/show_bug.cgi?id=775450
2016-12-01 13:38:52 +02:00