Commit graph

199 commits

Author SHA1 Message Date
Edward Hervey
ee55f94ac0 riff-media: Handle strf_data being NULL
Instead of trying to get the size of a NULL buffer :)
2017-11-02 09:19:21 +01:00
Sebastian Dröge
5d505d1088 riff-media: Don't divide block align by zero channels
https://bugzilla.gnome.org/show_bug.cgi?id=777525
2017-01-20 12:41:16 +02:00
Sebastian Dröge
ef55c8a6b7 riff-media: Don't recurse in for nested WAVEFORMATEX
There was already a check for that, but it failed because
subformat_guid[0] is a guint32 and that is then casted implicitely to a
guint16 when recursing... just that we checked the uncasted value.

This caused an infinite recursion and thus stack overflow.

https://bugzilla.gnome.org/show_bug.cgi?id=777265
2017-01-18 13:11:07 +02:00
Sebastian Dröge
81d3ba3fa2 riff-media: Check for valid channels/rate before using the values
Otherwise we might divide by zero or otherwise create invalid caps.

https://bugzilla.gnome.org/show_bug.cgi?id=777262
2017-01-15 18:32:34 +01:00
Sebastian Dröge
19ece085ac riff-media: Fix up last commit 2016-12-20 13:00:59 +02:00
Nicola Murino
a75be73471 riff: add ADPCM_G722 support
https://bugzilla.gnome.org/show_bug.cgi?id=746574
2016-12-20 12:48:32 +02:00
Sebastian Dröge
0846eb5b27 riff-media: Check if caps are NULL before using them for the first time, not afterwards
Otherwise we'll get a g_critical() before erroring out cleanly on
https://samples.mplayerhq.hu/A-codecs/ATRAC3/SND0.AT3
2016-11-26 13:54:41 +02:00
Sebastian Dröge
088aebfda9 riff: Extract bpp from the strf for vnmc
Needed for avdec_vnmc to work.
2016-11-16 20:49:11 +02:00
Carlos Rafael Giani
9adaeb0a71 riff: Remove sample rate and channel count boundaries in caps
WAV is too generic to impose more-or-less arbitrary boundaries on the
sample rate and channel count caps. For example, there are 384 kHz WAV
files. Another example: it is in theory possible that somebody puts DSD
data into a WAV file, which will then have a sample rate of ~2.8 MHz.

For this reason, get rid of the rate and channel caps unless they are
fixed values. Downstream anyway usually knows the limitations better.

https://bugzilla.gnome.org/show_bug.cgi?id=761514
2016-08-02 15:25:53 +03:00
Luis de Bethencourt
055ed65d92 riff: add FourCC aliases
Support media using the aliases defined in http://www.fourcc.org/ that are
exact duplicates of already known codes.
2015-12-12 20:22:44 +00:00
Luis de Bethencourt
98e93ec5ee riff: use defined FourCC
Make gst_riff_create_video_caps() use the FourCC available in riff-ids.h,
like gst_riff_create_audio_caps() does.
2015-12-12 20:22:09 +00:00
Edward Hervey
27f2328348 riff: 'DXSA' is the same as 'DXSB'
Which is subpicture/x-xsub
2015-12-02 16:37:50 +01:00
Sebastian Dröge
c1776a9dd3 riff-media: Error out early if we observe an invalid audio format 2014-12-18 13:25:01 +01:00
Sebastian Dröge
5ecbc9eea2 riff: Also handle invalid block aligns for raw audio
Fixes audio playback of
http://demo.archermind.com/Test%20Sample/Video/MPEG%204/Divx3/Low-Motion/576-320.avi

Audio and video together is still broken because of other issues.
2014-12-18 13:25:01 +01:00
Peter G. Baum
7b211bf6b3 riff-media: allow more channel_masks
Allow partial valid channel masks.
Set channel mask to 0 for non-valid channel masks.

https://bugzilla.gnome.org/show_bug.cgi?id=733405
2014-10-14 10:29:56 +02:00
Nicola Murino
26e3c92093 riff: Fix G726 caps creation
https://bugzilla.gnome.org/show_bug.cgi?id=720995
2014-01-19 10:34:57 +01:00
Nicola Murino
3a8c1b3550 riff: Add G726 ADPCM support
https://bugzilla.gnome.org/show_bug.cgi?id=720995
2014-01-08 09:45:14 +01:00
Edward Hervey
213596cc85 riff-media: Fix array read
nbchannels ranges from 1 to 8, therefore use '- 1' to get the proper
array value.
2013-12-30 13:46:34 +01:00
Matej Knopp
2976866348 riff: Add support for TechSmith Screen Capture 2
https://bugzilla.gnome.org/show_bug.cgi?id=707878
2013-09-11 11:04:30 +02:00
Josep Torra
f20972c6a9 riff: Provide correct media type for MSS1 and MSS2
Windows Media Video Screen (WMV Screen) are video formats that
specilise in screencast content. This provides a correct media type
for them instead of just video/x-asf-unknown.
2013-08-30 14:55:49 +02:00
Olivier Crête
1ed1792560 riff-media: Add 'png ' fourcc
On top of mpng, MPNG, PNG, there is also png it seems

https://bugzilla.gnome.org/show_bug.cgi?id=704291
2013-07-15 17:09:16 -04:00
Reynaldo H. Verdejo Pinochet
0a914f8fe2 riff: Provide correct media type for XSub
Xsub (fourcc DXSB) is a subpicture stream used for embeded
subtitles on divx files. This provides a correct media type
for them instead of just video/x-avi-unknown.
2013-07-11 12:42:48 -04:00
Julien Moutte
6f9006c9b9 riff: Manually calculate bitrate of ADPCM streams
Some ADPCM encoding tools like Oxelon generate WAV files with
wrong format header declaring an invalid bitrate.

As wavparse uses the average bitrate to calculate timestamps
and duration the decoder can be confused by receiving timestamps
completely out of sync with the decoded samples.

ADPCM is a CBR audio codec so we can calculate the average bitrate
instead of trusting the format header.

https://bugzilla.gnome.org/show_bug.cgi?id=636245
2013-05-07 15:01:05 +02:00
Tim-Philipp Müller
1a83c7a36a riff: wma can have more than 6 channels
Some versions anyway.
2013-05-03 16:24:55 +01:00
Matej Knopp
90620b236a riff: add format=WMV3 for WMV 3 caps
https://bugzilla.gnome.org/show_bug.cgi?id=697665
2013-04-15 12:39:25 +02:00
Dirk Van Haerenborgh
e8ca0528a9 riff: never create caps with negative height
https://bugzilla.gnome.org/show_bug.cgi?id=695540
2013-03-11 14:23:05 +01:00
Matej Knopp
5385a65b04 riffmedia: add systemstream to all mpeg video caps 2013-02-14 10:58:38 +01:00
Wim Taymans
d094ac49cc riff: add more gray8 variants 2013-01-31 12:57:11 +01:00
Dirk Van Haerenborgh
a81089614b riff: add support for raw monochrome 8-bit video
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692930
2013-01-31 12:56:16 +01:00
Pete Beardmore
569f3a29ab riff: add waveformatextension generic support
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=690591
2013-01-14 16:49:15 +01:00
Wim Taymans
ca456ec6f9 riff: add channel masks for all formats
Add the channel masks for all the extensible formats
Pass the number of channels instead of reading them from caps.
2012-12-21 14:03:32 +01:00
Pete Beardmore
d2c68e602d riff: add waveformatextension ac3 support
fixes #690591
2012-12-21 13:28:41 +01:00
Tim-Philipp Müller
5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Wim Taymans
3787b6d05e riff: add bpp to caps for msvideo
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686298
2012-10-22 10:30:16 +02:00
Tim-Philipp Müller
4834e11da0 riff-media: fix palette extraction some more
We still need to make sure the palette is always at least 1024
bytes.
2012-10-16 11:48:32 +01:00
Tim-Philipp Müller
b0d581eadc riff: create palette_data buffer correctly
gst_buffer_copy_into() will append to any existing
memory region, so don't create a buffer and alloc
some memory, but just create an empty buffer and
let _copy_into() append the memory we want. Fixes
the palette being 2048 bytes with the first half
being filled with garbage.

https://bugzilla.gnome.org/show_bug.cgi?id=686046
2012-10-16 00:55:56 +01:00
Tim-Philipp Müller
b772d5d271 riff: 8-bit paletted video is format RGB8P, not RGB8_PALETTED
https://bugzilla.gnome.org/show_bug.cgi?id=686046
2012-10-12 21:31:25 +01:00
Tim-Philipp Müller
37f9177817 video/x-3ivx -> video/mpeg, mpegversion=4 2012-09-10 00:28:15 +01:00
Tim-Philipp Müller
ba7d738d9e video/x-xvid -> video/mpeg,mpegversion=4 2012-09-03 18:56:26 +01:00
Mark Nauwelaerts
edbd1784bf riff: rename field in gst_riff_strf_auds
... which is supposed to align with WAVEFORMATEX, but has confusing
names compared to the last 2 fields in the latter (and still
misses 1 field compared to the latter).
2012-07-09 12:27:56 +02:00
Tim-Philipp Müller
6cd3faaa65 riff: fix compilation on big-endian
Update to new gst_buffer_map() API
2012-02-22 21:22:06 +00:00
Wim Taymans
d2ea46cdbf Merge branch 'master' into 0.11
Conflicts:
	tests/examples/seek/seek.c
2012-02-21 10:01:30 +01:00
David Schleef
0b3f956277 riff: Add v210, r210 formats 2012-02-18 17:38:05 -08:00
Wim Taymans
fcdc385aa1 port to new map API 2012-01-25 12:30:53 +01:00
Wim Taymans
1317811af6 riff: don't use NULL arrays 2012-01-05 12:31:51 +01:00
Sebastian Dröge
c52b50a517 riff: Return a channel reorder map for raw audio when creating the caps 2012-01-05 10:34:25 +01:00
Sebastian Dröge
7cd0659032 riff: Add the layout field to the raw audio caps 2012-01-05 10:34:24 +01:00
Sebastian Dröge
ee80a97a2a riff: Port to the new multichannel caps 2012-01-05 10:34:24 +01:00
Stefan Sauer
d0a5cb8c01 riff-media: port GST_BUFFER_DATA to 0.11 in conditional code branch 2011-12-14 11:31:31 +01:00
Wim Taymans
06311362e9 fix compilation 2011-10-27 17:26:58 +02:00