Commit graph

787 commits

Author SHA1 Message Date
Edward Hervey
417e3e0346 asfdemux: Make sure we don't end up with negative timestamps.
Some files have payload with timestamps smaller than the preroll duration.
Instead of blindly substracting the preroll value (and ending up with
insanely high timestamps on the outgoing buffers), we make sure we
never go below 0.

Fixes #610432
2010-02-19 18:11:13 +01:00
Robert Swain
ad45fd1827 asfdemux: Improve seek behaviour for audio-only with no index
Instead of seeking to seek_time - 5s in the hope of hitting a keyframe
for video, we can just seek to seek_time instead.
2010-02-16 13:02:47 +01:00
Tim-Philipp Müller
efc5181d13 rtspreal: don't construct config header with uninitialised bytes
Turns out 4 + 4 + 2 + (4 * 2) is actually 18 and not 22. This avoids
a presumably unintentional padding of uninitialised bytes at the end
of the CONT tags chunk, which should be harmless but causes warnings
in valgrind (see #608533 for a test URL).
2010-01-31 13:03:58 +00:00
Tim-Philipp Müller
cd6b16734e rtspreal: add finalize function so we can free streams and rulebook
Fix memory leak in Real RTSP component (#608533).
2010-01-30 19:15:15 +00:00
Tim-Philipp Müller
4cb5f32308 rtspreal: fix minor memory leak
Caps take their own reference when a buffer is added to them, so
unref buffer after adding it to caps (#608533).
2010-01-30 19:15:15 +00:00
Tim-Philipp Müller
29c509a7b8 rdtdepay: unref input buffer when done
Fixes memory leak, see #608533.
2010-01-30 19:15:15 +00:00
Thiago Santos
8f60eb26f3 asfdemux: Do not subtract padding twice
Only subtract implicit padding if an explicit one isn't
provided. Avoids subtracting it twice and causing
parsing errors.

Fixes #607698
2010-01-22 15:49:58 -03:00
Stefan Kost
da70785dcd assert: g_assert_not_reached() cannot replace return statement
Fix build with assert being turned off.
2010-01-22 16:55:14 +02:00
Edward Hervey
8829c5141a asfdemux: Don't forget to update flow variable
Forgot to update the return value in the loop.
2010-01-18 18:01:55 +01:00
Edward Hervey
bb20a20d86 asfdemux: Check flow return on every push
We previously only aggregated flow returns after the while(push) loop,
which meant that in some cases we would end-up not properly aggregating
the flow returns.

This is based on the same flow aggregation algorithm as oggdemux.
2010-01-18 17:51:57 +01:00
Arnaud Patard
9094dc1bc6 xingmux: Fix unaligned memory access
ARM/SPARC need 32bit alignment but xingmux accesses possibly
unaligned memory, which leads to SIGBUS.

Fixes bug #586464.
2010-01-11 14:06:03 +01:00
Michael Smith
84d80fffcd asfdemux: Use GST_STR_NULL in a couple of places.
Fixes crashing on some of the log statements on win32.
2010-01-07 14:37:31 -08:00
Thiago Santos
6dd3525806 rmdemux: Parse and post bitrate for streams
Parse the bitrate of the streams and post their tags.

Fixes #599299
2010-01-07 16:36:08 -03:00
Thiago Santos
db73c4337d asfdemux: Post bitrate tag
If stream bitrate object is available, post the bitrate
tags.

Fixes #599297
2010-01-07 13:54:21 -03:00
Mark Nauwelaerts
8e5df1a902 mp3parse: minor validation check of (Xing, VBRI) metadata
... to detect e.g. a truncated file, rendering some of the metadata invalid.
2010-01-04 15:25:52 +01:00
Mark Nauwelaerts
b64f6065c2 mp3parse: use proper total_time and total_bytes in various cases
The correct basis for (Xing, VBRI) seek table calculations is the
byte size and duration provided by that metadata, rather than some
other (possibly even estimated) one.  This also prevents an infinite
conversion loop in (unlikely) case where a TOC is provided without
such corresponding (duration) metdata.
2010-01-04 15:25:50 +01:00
Thiago Santos
5e3f07b6a1 mp3parse: conserve stop time for non-accurate seek
Use the same strategy as accurate seeks to store
pending non-accurate seeks to avoid overwriting non-definite
stop times. When doing non-accurate seeks our position
reporting might drift off by some secs and the stream can
end up before it should.

Fixes #603695
2010-01-04 10:01:44 -03:00
Thiago Santos
ea7a9e550a mp3parse: return false when we can't seek
When upstream can't seek, we return false as well
2009-12-08 19:01:50 -03:00
Mark Nauwelaerts
9fe72b5da3 mp3parse: fix non-flushing seek
Specifically, in addition to clearing lots of variables/offsets
when receiving newsegment, also clear leftover data to match.
2009-11-26 15:58:57 +01:00
Benjamin Gaignard
26290a698c asfdemux: Don't call strlen() on NULL pointers
Fixes bug #602280.
2009-11-18 09:58:39 +01:00
Thiago Santos
b4007d3c76 asfdemux: Remove old pads when new ones are added
The old pads were being removed before adding the new ones,
we should add the new ones first.

Fixes #599718
2009-11-09 15:02:05 -03:00
Thiago Santos
a155733bff asfdemux: Handle chained asfs on pull mode
Adds chained asfs handling to pull mode. It now checks if
there is a new asf header after the last packet (when it
is possible to know how many packets are) or it tries
checking if a processed packet that fails is an header
object.

Fixes #599718
2009-11-09 14:24:13 -03:00
Thiago Santos
dc65baacf6 asfdemux: properly do chained asfs on push mode
To properly do chained asfs work with playbin2, we need to
push eos on the old pads before removing them.

Fixes #599718
2009-11-09 14:23:04 -03:00
Thiago Santos
37e805ef24 asfdemux: add support for chained asfs (push mode)
Adds support for detecting and playing chained asfs
in push mode. asfdemux tries to detect a new asf start
by identifying the header object guid in a input buffer.
When it finds it, it resets its state, removing its pads
and creates new ones for the new file.
2009-11-06 18:59:30 -03:00
Tim-Philipp Müller
9e3e475f36 asfdemux: fix two small leaks 2009-11-05 18:33:09 +00:00
Tim-Philipp Müller
b84bf977b1 asfdemux: prefer WM/TrackNumber over WM/Track, it's more reliable
WM/Track has a 0 base but is often wrongly written as starting from 1,
so not as reliable as WM/TrackNumber which always starts from 1.
2009-11-05 18:19:58 +00:00
Tim-Philipp Müller
1c88985618 asfdemux: WM/Track starts counting from 0, adjust to start from 1 2009-11-05 18:11:55 +00:00
Tim-Philipp Müller
aa52dd1320 asfdemux: map WM/TrackNumber to GST_TAG_TRACK_NUMBER as well
There's both WM/Track and WM/TrackNumber.
2009-11-05 18:11:35 +00:00
Jan Schmidt
be7f763882 dvdsubdec: Fix printf format string warning 2009-11-04 15:50:17 +00:00
Jan Schmidt
acd6f70515 asfdemux: Fix bogus variable used uninitialised warnings 2009-11-04 15:46:04 +00:00
Michael Smith
2349f09e6a asfdemux: fix c99-style comments. 2009-10-29 11:39:13 -07:00
Michael Smith
5ccedb2a38 asfdemux: accept fragments in a continued packet where the subsequent fragments
declare a size of 0. Fixes bug 600037.
2009-10-29 10:36:08 -07:00
Wim Taymans
3784de031d rmutils: fix byteswapping
fix the byteswapping code that was wrong because of the side effects of the
READ/WRITE macros.

Fixes #599676
2009-10-27 12:33:24 +01:00
Thiago Santos
59f6c82c32 asfdemux: careful to avoid crash on bogus data
When receiving bogus data, we have to avoid subtracting a value
larger than 'size' from 'size' variable, resulting in a wrap
that would make 'size' a really large bogus value.

Fixes #599333
2009-10-26 17:31:19 -03:00
Edward Hervey
33b4528a0e mpegaudioparse: Don't use expensive glib ways to get an enum nick.
Fixes #598761

This removes a good 50% of processing time for parsing a buffer.

We do this by simply... getting the nicks that we already have handy
instead of going through the expensive glib system.
2009-10-24 20:37:13 +02:00
Josep Torra
8841ca0a3c mpegstream: fix warning in macosx snow leopard 2009-10-11 16:16:09 +02:00
Josep Torra
9c6b0cacb5 mpegaudioparse: fix warning in macosx snow leopard 2009-10-11 16:14:08 +02:00
Josep Torra
8d77fcd1fb dvdsubdec: fix warning on macosx snow leopard 2009-10-11 16:09:11 +02:00
Josep Torra
c4fe899f1a asfdemux: fix warning in macosx snow leopard 2009-10-11 16:06:25 +02:00
René Stadler
0b0b07eb49 mp3parse: don't fail SEEKING query when upstream query fails for TIME format 2009-10-08 20:10:11 +03:00
Stefan Kost
d125baa8c5 build: fprintf, sprintf, sscanf need stdio.h 2009-10-07 14:22:09 +03:00
Wim Taymans
f2613470fd dvdlpcm: whitespace fixes 2009-10-05 12:14:18 +02:00
Mark Nauwelaerts
820abb3ab8 mpegaudioparse: prevent infinite (re)syncing
Conflicts:

	gst/mpegaudioparse/gstmpegaudioparse.c
2009-09-25 18:11:48 +02:00
Michael Smith
8307e177ba mp3parse: Refactor checking for sync. Make resyncing more reliable.
Previously, we could get false sync relatively easily - it sometimes happened
on real files. This cleans the code up a fair bit, and makes it require more
confirmation that we've found valid sync before continuing.
2009-09-22 12:17:18 -07:00
Mark Nauwelaerts
57d01c2526 mpegaudioparse: ensure 2 valid headers in a row when resyncing 2009-09-17 16:22:36 +02:00
Tim-Philipp Müller
59f5b02444 dvddemux: remove bogus ifndef 2009-09-11 10:05:30 +01:00
Tim-Philipp Müller
94a404cb8d dvdsubparse: GstAdapter is not a GstObject and should be freed with g_object_unref 2009-08-31 13:44:31 +01:00
David Schleef
0c15317848 asfdemux: Remove old non-built asfmux code
Remove so people don't confuse it with the new asfmux code
in -bad.
2009-08-24 14:00:23 -07:00
Mark Nauwelaerts
52f6764e4c mpegaudioparse: use metadata (xing, vbri) provided bytesize for conversions
Metadata provided seek tables are consistent with metadata's view of
total size, which typically matches real size, but need not do so
(e.g. a truncated file).  Fixes seeking and position reporting
in such truncated files (although duration based on metadata may then
still be incorrect).
2009-08-14 12:07:40 +02:00
Thiago Santos
6adb49c501 rtpasfdepay: set padding size to the correct value
asf packets in rtp packets should come with their padding fields
set to 0 and the depayload must update them to the correct
value before pushing downstream
2009-07-31 00:25:43 -03:00