Commit graph

374 commits

Author SHA1 Message Date
Reynaldo H. Verdejo Pinochet
0bb8000874 flacparse: demote warning on wrong reserved value to fixme
We are likely just parsing a backward-compatible stream we
don't fully support.
2016-01-10 22:54:12 -08:00
Tim-Philipp Müller
6dab3ece07 flacparse: don't map buffer multiple times when parsing 2016-01-07 16:24:09 +00:00
Reynaldo H. Verdejo Pinochet
ba094b50e1 flacparse: add debug msg on CRC mismatch while validating frame header 2015-12-31 16:04:15 -08:00
Reynaldo H. Verdejo Pinochet
6b7675e4a2 flacparse: drop unneeded braces at _parse_frame() exit
Additionally, drop redundant comment & line break
2015-12-31 16:04:15 -08:00
Reynaldo H. Verdejo Pinochet
b6ebad0997 flacparse: minor grammar correction 2015-12-31 16:04:15 -08:00
Reynaldo H. Verdejo Pinochet
5234c7c2bd flacparse: update URLs on pointers to online spec 2015-12-31 15:34:57 -08:00
Reynaldo H. Verdejo Pinochet
5f4317843c flacparse: make buffer DTS setting explicitly unconditional
We are setting it to PTS regardless of block_strategy
2015-12-31 14:40:15 -08:00
Reynaldo H. Verdejo Pinochet
2c14f2fff1 flacparse: add actual invalid block type to warning
For someone that read the spec is clear the only *invalid*
data block type is 127. For the rest, its useful information.

Additionally. values 7-126 are currently reserved by the
spec so the situation might change in the future.
2015-12-31 14:21:40 -08:00
Reynaldo H. Verdejo Pinochet
c43f84abf3 flacparse: use shift instead of mask & comp
We are only interested on the first bit of the first
byte of the metadata block header to figure out whether
is marked as the last one. The shift makes it quite
clearer.
2015-12-31 14:12:36 -08:00
Reynaldo H. Verdejo Pinochet
8a745837aa flacparse: warn on wishful parsing of weird headers
If we get anything from 7 to 126 as type when parsing
a metadata block header, we are likely dealing with a
FLAC stream version we don't fully understand. Issue
a warning if so.

Document function assumptions regarding the passed-on
type while at this.
2015-12-31 13:04:23 -08:00
Reynaldo H. Verdejo Pinochet
df6f0bc595 flacparse: show meaningful info on frame CRC check
As CRCs are calculated for the comparition already, we
might as well (cheaply) inform the user how the numbers
differ if a missmatched pair is found.

While at it:

Rephrase candidate-frame message to make more sense
2015-12-31 13:04:23 -08:00
Reynaldo H. Verdejo Pinochet
395afed566 flacparse: drop remaining trailing whitespace 2015-12-31 13:04:23 -08:00
Reynaldo H. Verdejo Pinochet
a086ee6192 flacparse: drop superflous else clauses 2015-12-31 13:04:23 -08:00
Reynaldo H. Verdejo Pinochet
7286aae6e5 flacparse: factor out buffer time and offset resetting
Avoids multiple occurrences of the same resetting pattern
2015-12-31 13:04:23 -08:00
Reynaldo H. Verdejo Pinochet
5bf1f1ec9c flacparse: move block handling by type out of _parse_frame() 2015-12-31 13:04:23 -08:00
Reynaldo H. Verdejo Pinochet
eb47176b7c flacparse: drop redundant return statement on _header_is_valid()
Fix the rather vague error message while at it.
2015-12-30 22:33:58 -08:00
Reynaldo H. Verdejo Pinochet
276fcc5916 flacparse: rework gst_flac_parse_frame_is_valid()
drop unnecessary nesting looking for end of frame
2015-12-30 21:43:55 -08:00
Reynaldo H. Verdejo Pinochet
90b62be301 flacparse: factor out context clearing routine 2015-12-30 21:43:45 -08:00
Dave Craig
328346ad21 audioparsers: Check for NULL return value of gst_pad_get_current_caps()
https://bugzilla.gnome.org/show_bug.cgi?id=759503
2015-12-16 10:12:44 +01:00
Edward Hervey
6888871d2a aacparse: Avoid over-skipping when checking LOAS config
There might be multiple LOAS config in a row in a full frame. The first
one might be a multi-layer config (which we can't properly parse yet)...
but then followed by a valid (single-layer) one.

The code was previously skipping whole frames (instead of just the LOAS
config we failed to read) resulting in multiple frames (seen up to 6s in
some situation) being dropped before finally getting the configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=758826
2015-12-02 14:12:55 +01:00
Vineeth TM
fb7783f8b0 mpegaudioparse: Fix buffer memory leak during failures
mapped buffer is not being unmapped during failures

https://bugzilla.gnome.org/show_bug.cgi?id=756231
2015-10-12 16:56:30 +03:00
Guillaume Marquebielle
35139ee8b7 aacparse: fix uninitialized variables in LOAS config reading
On reading LOAS config, flag v=1 and vA=1 combination can occur, leading to warning
"Spec says "TBD"...". Returning TRUE on this case while parameters 'sample_rate' and
'channels' are pointing to uninitialized values can end on setting random values as
rate and channels on src caps.

https://bugzilla.gnome.org/show_bug.cgi?id=755611
2015-09-26 22:18:26 +10:00
Jan Schmidt
c919548e2c aacparse: Skip LOAS AAC until a valid config is seen.
It's normal when dropping into the middle of a stream to
not always have the config available immediately, so skip LOAS
until a valid config is seen without either setting invalid
caps or erroring out.

https://bugzilla.gnome.org/show_bug.cgi?id=751386
2015-09-16 20:51:44 +10:00
Tim-Philipp Müller
fcdb79ef7b wavpackparse: set both pts and dts so baseparse doesn't make up wrong dts after seeks
https://bugzilla.gnome.org/show_bug.cgi?id=752106
2015-09-06 16:36:47 +01:00
Tim-Philipp Müller
0d88f27108 flacparse: set both pts and dts so baseparse doesn't make up wrong dts after a seek
flac contains the sample offset in the frame header, so after a seek
without index flacparse will know the exact position we landed on and
timestamp buffers accordingly. It only set the pts though, which means
the baseparse-set dts which was set to the seek position prevails, and
since the seek was based on an estimate, there's likely a discrepancy
between where we wanted to land and where we did land, so from here on
that dts/pts difference will be maintained, with dts possibly multiple
seconds ahead of pts, which is just wrong. The easiest way to fix this
is to just set both pts and dts based on the sample offset, but perhaps
parsed audio should just not have dts set at all.

https://bugzilla.gnome.org/show_bug.cgi?id=752106
2015-09-06 16:36:44 +01:00
Tim-Philipp Müller
a39bebb5fe mpegaudioparse: use new baseparse API to fix tag handling
https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 17:21:24 +01:00
Olivier Crête
b1dfe209c2 audioparsers: use new base parse API to fix tag handling
https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 17:02:19 +01:00
Tim-Philipp Müller
a042a98159 flacparse: use new baseparse API and fix tag handling
https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 16:33:55 +01:00
Sebastian Dröge
64b06d1829 dcaparse: Don't look for a second syncword
There are streams out there that consistently contain garbage between
every frame so we never ever find a second consecutive syncword.

See https://bugzilla.gnome.org/show_bug.cgi?id=738237
2015-08-15 13:00:06 +02:00
Thiago Santos
9523fb23ed audioparsers: enable accept-template flag
Do a quick check with the pad template caps as it is enough. Users
should have figured the appropriate full caps on a previous caps query

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 13:42:27 -03:00
Stefan Sauer
093e8f8a75 docs: remove outdated doc strings 2015-07-07 17:12:02 +02:00
Vineeth TM
e44ce40455 flacparse: fix possible memory leak
when buffer is stored to seektable, and stop gets called due to
corrupt flac file, then the seektable is not being released

https://bugzilla.gnome.org/show_bug.cgi?id=751364
2015-06-23 10:17:53 +02:00
Vineeth TM
78fcd03ca3 dcaparse: initialize size variable
size can be used in cleanup without being initialized. Hence
setting it to 0 when declaring

https://bugzilla.gnome.org/show_bug.cgi?id=751306
2015-06-22 10:58:35 +01:00
Vineeth TM
331fca4dfb mpegaudioparse: initialze bpf variable
bpf variable might be used in cleanup without being intialized.

https://bugzilla.gnome.org/show_bug.cgi?id=751306
2015-06-22 10:57:35 +01:00
Sebastian Dröge
ec82eba96b aacparse: Add support for channel configurations 11, 12 and 14 and 7 actually has 8 channels
ISO/IEC 14496-3:2009/PDAM 4 added 11, 12 and 14.
2015-06-04 16:09:41 +02:00
Guillaume Desmottes
2bd3685d04 flacparse: fix buffer leak when stored to seektable
Fix a leak with the
validate.file.playback.change_state_intensive.samples_multimedia_cx_flac_Yesterday_flac
scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=749072
2015-05-08 11:11:40 +01:00
Vincent Penquerc'h
6e3835594c ac3parse: fix memory leak 2015-04-17 13:33:09 +01:00
Nicolas Huet
5ead23a14a aacparse: fix LOAS parsing issue
Fix missing index in syncword searching

https://bugzilla.gnome.org/show_bug.cgi?id=745585
2015-03-06 14:34:08 -03:00
Matej Knopp
ff5b235c32 ac3parse: request at least 8 bytes to properly parse header
https://bugzilla.gnome.org/show_bug.cgi?id=742325
2015-01-08 14:45:23 +01:00
Sebastian Dröge
f5d26af3c9 aacparse: Also only unref caps if they're not NULL 2014-12-10 11:35:29 +01:00
Sebastian Dröge
6d6c6aac13 aacparse: gst_pad_get_allowed_caps() will return NULL if there is no peer 2014-12-10 11:35:02 +01:00
Sebastian Dröge
4aac09e708 aacparse: Always set profile/level on the caps
We have the information already, so why not use it?
2014-10-26 11:47:25 +01:00
Matej Knopp
e1d275cfec aacparse: fix memory leak when prepending ADTS headers
https://bugzilla.gnome.org/show_bug.cgi?id=737761
2014-10-02 10:41:28 +03:00
Sanjay NM
323683db96 audioparsers: Added index check before using the index
https://bugzilla.gnome.org/show_bug.cgi?id=736878
2014-09-24 10:21:35 +03:00
Sebastian Dröge
91a3d044f0 flacparse: Only calculate with durations != -1 2014-09-23 22:56:21 +03:00
Ognyan Tonchev
7cd335e9b9 flacparse: do not leak uid after parsing TOC event
https://bugzilla.gnome.org/show_bug.cgi?id=736739
2014-09-17 09:51:15 +03:00
Nicolas Huet
15894c1853 aacparse: Fix parsing issue when the buffer does not have a complete ADTS/LOAS frame
https://bugzilla.gnome.org/show_bug.cgi?id=735520
2014-09-02 09:43:14 +03:00
Sebastian Dröge
638a700463 aacparse: Properly report in the CAPS query that we can convert ADTS<->RAW
https://bugzilla.gnome.org/show_bug.cgi?id=733190
2014-07-16 17:27:57 +02:00
Tim-Philipp Müller
615f6e55c1 flacparse: skip PICTURE headers without any image data
Fixes warning if the image length is 0.
2014-05-07 00:58:15 +01:00
Vincent Penquerc'h
0253db6d36 mpegaudioparse: remove dead code
A stricer check is already done earlier, and integer overflows
do not seem possible here.

Coverity 1139675
2014-04-30 17:48:53 +01:00