Commit graph

6146 commits

Author SHA1 Message Date
Tim-Philipp Müller dbe6fdd6bf docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-27 00:36:32 +01:00
Sebastian Dröge dec5de073d mpegtsmux: Only require alignment and stream-format for h264, parsed is implicit 2014-04-25 17:40:56 +02:00
Edward Hervey f982feb1d9 mpegpsdemux: Flush program end code bytes
This should not harm regular files, since those are the last 4 bytes of
a normal file.

This allows to handle playback of concatenated mpeg-ps files. Seeking and
duration reporting is still wrong though.
2014-04-23 10:46:20 +02:00
Sebastian Dröge 516597d5fa mpegtspacketizer: Remove dead code and simplify if statement
CID 1204274
2014-04-22 12:56:54 +02:00
Vincent Penquerc'h 60d7e45cab mxf: fix MP2 case
Testing mpegversion when mpegaudioversion was likely meant.

Similar tests in sys/androidmedia/gstamcaudiodec.c also test
mpegaudioversion with the same conditional code.

Coverity 206071
2014-04-21 13:23:46 +01:00
Vincent Penquerc'h 7659f3bec4 vc1parse: guard against dividing by zero
If framerate is unknown, we write the maximum framerate
allowed for this profile/level:

https://tools.ietf.org/html/draft-ietf-avt-rtp-vc1-06#section-6.1
http://wiki.multimedia.cx/index.php?title=VC-1#Setup_Data_.2F_Sequence_Layer

Coverity 1139694
2014-04-21 13:23:46 +01:00
Vincent Penquerc'h d111287995 mxfmux: guard against dividing by 0
Use a placeholder value in that case, it's better than crashing.

Coverity 1139697
2014-04-21 13:23:46 +01:00
Vincent Penquerc'h 52981d5a4a mxfdemux: guard against NULL non source components
This component is dereferenced, and later code checking for
NULL in particular cases implies it can be NULL. This likely
does not fix the coverity warning as it was seeing another
path setting component to NULL explicitely, but this was
spotted by looking at:

Coverity 1139736

Which is actually OK from what I can see since the actual
dereference of the explicit NULL pointer will not happen
if the condition that led to the NULL pointer assignment
is met, since the assignment and defeference have mutually
exclusive tests.
2014-04-21 09:24:00 +01:00
Vincent Penquerc'h 9815faea9b rawparse: catch errors in caps manipulation
Coverity 1139622
2014-04-21 09:24:00 +01:00
Gwenole Beauchesne abadffd4d8 ivfparse: detect and propagate resolution changes.
Detect resolution changes on key frames, and propagate the resulting
caps to the src pad. Only the uncompressed data chunk is decoded, so
avoid using the new VP8 bitstream parsing library for now.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-04-18 18:31:15 +02:00
Gwenole Beauchesne 3b308cba3c ivfparse: avoid possible division-by-zero when calculating PTS.
Avoid possible division-by-zero while deriving the presentation timestamp
of the buffer. The base class will take care of any interpolation needs.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-04-18 18:31:15 +02:00
Gwenole Beauchesne 3d0ce67fcd ivfparse: port to baseparse.
https://bugzilla.gnome.org/show_bug.cgi?id=710855

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-04-18 18:31:15 +02:00
Edward Hervey f062b78051 mpegtspacketizer: Improve ts_to_offset code
* Search in current pending values first. For CBR streams we can very
  easily end up having just one initial observations and then nothing
  else (since the bitrate doesn't change).
* Use one group whether we are in that group *OR* if there is only
  one group.
* If the group to use isn't closed (points are being accumulated in the
  PCROffsetCurrent), use the latest data available for calculation
* If in the unlikelyness that all of this *still* didn't produce more
  than one data point, just return the initial offset
2014-04-18 16:23:43 +02:00
Edward Hervey f96604099d tsdemux: Fix scaling macros
While the calculation done in these macros will work with 64bit
integers, they will fail if working with 32bit integers.

Force the scaling up to solve that.

This amazingly didn't introduce major issues up to now, but resulted
in bogus values in debug logs.
2014-04-18 16:20:31 +02:00
Edward Hervey da74a23c1d mpegtsbase: Don't hard-flush the packetizer on discont buffers
Doing a hard flush on the packetizer will drop all observations, which
will eventually break push-based seeking (with BYTES segment) since
we won't know where to seek to anymore (new data would always be
considered as the beginning of the stream).
2014-04-18 16:18:01 +02:00
Edward Hervey 3d6265a9f5 mxfdemux: Fix copy/paste error
We want to check whether the rate is different. We check changes in
numerator *and* denominator.

CID #1139631
CID #1139642
2014-04-16 16:25:29 +02:00
Edward Hervey be859d02a6 mxf: Handle fraction parsing failure
And properly cleanup/reset the segment before returning on errors

CID #206012
2014-04-16 16:19:47 +02:00
Edward Hervey fa72b4c870 mxf: Remove useless check
a guint will always smaller or equal to the maximum value it can
contain

CID #206049
2014-04-16 16:12:02 +02:00
Vincent Penquerc'h 172c398127 mxf: avoid dereferencing NULL mapping data pointer
Also unref buffers on error, as it seems to be done in one, but
not all, error paths.

The NULL pointer part is Coverity 206112

https://bugzilla.gnome.org/show_bug.cgi?id=727889
2014-04-16 16:08:38 +02:00
Andoni Morales Alastruey 78acb90a80 jp2kdecimator: fix maybe-uninitialized compiler error 2014-04-11 12:29:17 +02:00
Edward Hervey 998e19896b mpegtsmux: Remove unneeded unref
packet_buffer has already been cleared in all code paths leading
to this point.

CID #1199696
2014-04-11 11:34:26 +02:00
Santiago Carot-Nemesio 7d97a4b20b liveadder: fix memory leak querying sink caps
https://bugzilla.gnome.org/show_bug.cgi?id=727894
2014-04-10 01:22:33 +01:00
Vincent Penquerc'h 931150cb91 Revert "tsmux: catch alloc failure"
Turns out glib aborts on allocation failure, so this is pointless.
We'll just ignore Coverity warnings on such constructs.

This reverts commit d347809a82.
2014-04-09 16:01:43 +01:00
Vincent Penquerc'h 747542762e asfmux: remove unnecessary test
We've been dereferencing that object like there's no tomorrow
in the code just before that.

Coverity 206369
2014-04-09 15:41:11 +01:00
Vincent Penquerc'h c6a9c1d878 asfmux: remove stray gst_buffer_unmap on error path
A previous commit removed the map, and the unmap on the main
code path, but not the one on the error path.

Coverity 1139930
2014-04-09 15:39:33 +01:00
Vincent Penquerc'h 336767d779 autoconvert: remove dead code
Those events were previously taken from a cached events list,
which was removed during the port to 0.11, but this bit stayed.

Coverity 1139684
2014-04-09 15:28:05 +01:00
Vincent Penquerc'h c3a2e0ad97 camerabin2: remove unneeded check
A message may not be NULL in the message handling function
(and nothing there sets it to NULL).

Coverity 1139848
2014-04-09 15:24:13 +01:00
Vincent Penquerc'h 75c09f8d03 compare: special case empty regions with 1 SSIM to avoid dividing by 0
Coverity 1139689, 1139688
2014-04-09 15:21:20 +01:00
Vincent Penquerc'h 93b1504945 inter: remove dead code
Coverity 1139666
2014-04-09 15:09:25 +01:00
Vincent Penquerc'h c5cb2fbe96 liveadder: remove dead code
From the 0.11 port

Coverity 1139676
2014-04-09 15:03:45 +01:00
Vincent Penquerc'h f255422ec2 mpegtsdemux: catch prev-not-found when inserting in the group list
While this probably should never happen if callers are well behaved,
this avoids a crash if it does. With a warning about it. Unsure if
it'd be better to not add at all, but it should not happen...

Coverity 1139713
2014-04-09 14:13:46 +01:00
Vincent Penquerc'h d47727c032 mpegtsmux: guard against _dispose being called mutiple times
_dispose calls _reset, so we need to make sure _reset handles
already NULLed fields.

Coverity 1139843
2014-04-09 13:53:13 +01:00
Vincent Penquerc'h d6dc066527 tsmux: prevent possible double free on error path
Spotted while looking at a Coverity issue in the area.
2014-04-09 13:44:59 +01:00
Vincent Penquerc'h d347809a82 tsmux: catch alloc failure
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
2014-04-09 13:44:45 +01:00
Vincent Penquerc'h 744c58d71b speed: make duration query able to convert bytes to time
It was only querying in time, but then trying to use dead bytes
to time conversion code.

Coverity 1139677
2014-04-09 11:15:10 +01:00
Mohammed Sameer 0450e8f53f camerabin: add any feature to viewfinderbin static pad template
https://bugzilla.gnome.org/show_bug.cgi?id=727857
2014-04-09 08:56:01 +02:00
Mohammed Sameer b261374462 camerabin: report an error if we fail to link vfsrc and viewfinder queue
https://bugzilla.gnome.org/show_bug.cgi?id=727855
2014-04-09 08:54:07 +02:00
Tim-Philipp Müller 39dc1f0ebb mxfdemux: guard against NULL material track
Just to be on the safe side.
2014-04-08 16:53:41 +01:00
Jan Schmidt 982104d764 dvbsuboverlay: Avoid infinite loops on short data 2014-04-09 01:10:21 +10:00
Tim-Philipp Müller 6e764e5b11 mxfdemux: implement simple KEY_UNIT seeking
If a KEY_UNIT seek was requested, adjust segment
start to position of the key frame.
2014-04-08 14:37:34 +01:00
Tim-Philipp Müller 4898a51afe mxfdemux: fix seeking, send data starting from a key unit
Fixes multiple seeking issues. When doing ACCURATE or normal
non-KEYUNIT seeks, mxfdemux would just send data from the
edit unit that covered the seek position, whether that's
a keyframe or not. Decoders would only output things from
the next keyframe then, which means there's a gap between
the start of the segment and the first decoded data in
some cases. In combination with gst-editing-services this
might result in a frozen picture for the duration of that
gap at the beginning (if videorate fixes up the first
buffer's start timestamp to cover the entire gap), or
a black frame (if no videorate is used and videomixer
fills the gap). Also fixes A/V sync issue when requesting
a KEYUNIT seek.
2014-04-08 13:26:49 +01:00
Vincent Penquerc'h ff11934bbf festival: fix fd leak
Coverity 1139831
2014-04-08 12:20:40 +01:00
Edward Hervey 2b5d043654 speed: Clarify passthrough in switch statement
We do want the caps event to be forwarded downstream

CID #1139754
2014-04-08 11:26:38 +02:00
Edward Hervey 0ae5c15bf8 mpegtsmux: Initialize helper mpegts library
We now use that library, we need to initialize it so that debug
categories (amongst other things) get properly initialized
2014-04-08 07:47:15 +02:00
Vincent Penquerc'h 8e580ea6f1 mxf: fix stop date parsing using the wrong input
Coverity 1139645
2014-04-07 13:54:50 +01:00
Vincent Penquerc'h f06e18595a jp2kdecimator: fix copy/paste errors in expressions
Correct formulae found in ITU T.800, B.12.1.[345]

Coverity 1139649, 1139650, 1139651
2014-04-07 13:54:47 +01:00
Sebastian Dröge 22b6ec3b2f mpegtsmux: Require parsed/framed input for most of the supported formats
https://bugzilla.gnome.org/show_bug.cgi?id=719519
2014-04-02 23:49:37 +02:00
Sebastian Dröge 7b2cfa6303 mpegtspacketizer: Fix typo in debug output 2014-03-29 10:33:45 +01:00
Sebastian Dröge 10ffa089a0 h264parse: Copy over DISCONT flag from input buffers 2014-03-29 10:33:45 +01:00
Sebastian Dröge 986c8782e4 tsdemux: Push next buffer after a discont with the DISCONT flag 2014-03-29 10:33:45 +01:00