Commit graph

27 commits

Author SHA1 Message Date
Josep Torra
e1a98f3454 aacparse: fix warnings in macosx snow leopard 2009-10-11 11:22:11 +02:00
Mark Nauwelaerts
6c9a9d3304 aacparse: forego (bogus) parsing of already parsed (raw) input 2009-09-25 17:04:00 +02:00
Mark Nauwelaerts
222322e7f3 baseparse: prevent infinite loop when draining 2009-08-07 13:09:24 +02:00
Mark Nauwelaerts
1f2a0d3b3d baseparse: fix minor memory leak 2009-08-07 13:09:20 +02:00
Sebastian Dröge
8e1c21f309 aacparse: Add function for the baseparse subclass to push buffers downstream
Also handle the case gracefully where the subclass decides to drop
the first buffers and has no caps set yet. It's still required to
have valid caps set when the first buffer should be passed downstream.
2009-07-14 14:10:03 +02:00
Sebastian Dröge
493535dd89 baseparse: Fix seek event leaking 2009-07-14 14:10:03 +02:00
Mark Nauwelaerts
11dc33bea0 aacparse: ADIF: do not send bogus timestamps, leave to downstream (decoder) 2009-06-19 18:13:09 +02:00
Tim-Philipp Müller
bb95218b73 aacparse: fix sample rate extraction from codec data
In one case we extracted the sample rate index from the codec data
and saved it as sample rate rather than getting the real sample
rate from the table. Fix that, and also make sure we don't access
non-existant table entries by adding a small helper function that
guards against out-of-bounds access in case of invalid input data.
2009-06-02 00:56:53 +01:00
Tim-Philipp Müller
52904d7175 aacparse, amrparse: remove bogus gst_pad_fixate_caps() calls 2009-06-02 00:56:53 +01:00
Tim-Philipp Müller
44cee1789c baseparse: propagate return value of GstBaseParse::set_sink_caps()
gst_base_parse_sink_setcaps() presumably should fail if the subclass
returns FALSE from its ::set_sink_caps() function.
2009-06-02 00:56:53 +01:00
Tim-Philipp Müller
279727d777 baseparse: don't try to GST_LOG an already-freed caps string
The proper way to log caps is via GST_PTR_FORMAT anyway.
2009-06-02 00:56:53 +01:00
Tim-Philipp Müller
f5a03ec2a6 aacparse: set channels and rate on output caps, and keep codec_data
Create output caps from input caps, so we maintain any fields we
might get on the input caps, such as codec_data or rate and channels.
Set channels and rate on the output caps if we don't have input caps
or they don't contain such fields. We do this partly because we can,
but also because some muxers need this information. Tagreadbin will
also be happy about this.
2009-06-02 00:56:52 +01:00
Mark Nauwelaerts
c07be49896 baseparse: fix debug category 2009-05-28 13:08:42 +02:00
Mark Nauwelaerts
9bbacae78f baseparse: fix (regression in) newsegment handling
(aacparse, amrparse, flacparse).  Fixes #580133.
2009-05-03 14:46:58 +02:00
René Stadler
d5216a1a66 baseparse: Fix slightly broken buffer-in-segment check (aacparse, amrparse, flacparse) 2009-04-07 05:41:46 +03:00
René Stadler
0293f54d06 baseparse: Fix push mode seeking (aacparse, amrparse)
Sending the flush-start event forward before taking the stream lock actually
works, in contrast to deadlocking in downstream preroll_wait (hunk 1).

After that we get the chain function being stuck in a busy loop. This is fixed
by updating the minimum frame size inside the synchronization loop because the
subclass asks for more data in this way (hunk 2).

Finally, this leads to a very probable crash because the subclass can find a
valid frame with a size greater than the currently available data in the
adapter. This makes the subsequent gst_adapter_take_buffer call return NULL,
which is not expected (hunk 3).
2009-04-05 05:26:09 +03:00
Mark Nauwelaerts
ad2c7bffe7 baseparse: Delay newsegment as long as possible.
If newsegment is sent (too) early, caps may not yet be fixed/set,
and downstream may not have been linked.
2009-03-31 16:18:00 +02:00
René Stadler
83016fa9dc aacparse: Fix busyloop when seeking. Fixes #575388
The problem is that after a discont, set_min_frame_size(1024) is called when
detect_stream returns FALSE. However, detect_stream calls check_adts_frame
which sets the frame size on its own to something larger than 1024. This is the
same situation as in the beginning, so the base class ends up calling
check_valid_frame in an endless loop.
2009-03-23 20:57:15 +02:00
René Stadler
3f90e6ff13 aacparse: Refactor check_valid_frame to expose broken code
Just moving code around and removing an unhelpful/misleading comment.
2009-03-23 20:57:15 +02:00
Stefan Kost
5f2d5aa5a5 baseparse: revert last change and properly fix
Baseparse internaly breaks the semantics of a _chain function by calling it with
buffer==NULL. The reson I belived it was okay to remove it was that there is
also an unchecked access to buffer later in _chain. Actually that code is wrong,
as it most probably wants to set discont on the outgoing buffer.
2009-02-27 12:27:14 +02:00
Stefan Kost
68cb1a84de baseparse: remove checks for buffer==NULL
Accordifn to docs for GstPadChainFunction buffer cannot be NULL. If we would
leave the check, we would also need more such check below.
2009-02-26 11:05:31 +02:00
René Stadler
8f1d41637c aacparse: Fix license specified in plugin details. 2009-02-11 00:15:43 +02:00
Jan Schmidt
4ccbb0309f Fix the return value of the default parse_frame function.
Fix the return value of the default parse_frame function in both
copies of GstBaseParse
2009-01-30 18:18:10 +00:00
Stefan Kost
2af1d512c4 Log aac details found in codec_data. 2009-01-23 16:00:10 +02:00
Wim Taymans
411a21bafb gst/aacparse/gstaacparse.c: Don't autoplug aacparse until it works.
Original commit message from CVS:
* gst/aacparse/gstaacparse.c: (plugin_init):
Don't autoplug aacparse until it works.
2008-11-13 17:24:58 +00:00
Stefan Kost
56caaf6595 gst/: Fix baseparse type name.
Original commit message from CVS:
* gst/aacparse/gstbaseparse.c:
* gst/amrparse/gstbaseparse.c:
Fix baseparse type name.
2008-11-13 14:21:39 +00:00
Stefan Kost
7f42b7856b Add two new baseparse based parsers (aac and amr) from Bug #518857.
Original commit message from CVS:
* configure.ac:
* gst/aacparse/Makefile.am:
* gst/aacparse/gstaacparse.c:
* gst/aacparse/gstaacparse.h:
* gst/aacparse/gstbaseparse.c:
* gst/aacparse/gstbaseparse.h:
* gst/amrparse/Makefile.am:
* gst/amrparse/gstamrparse.c:
* gst/amrparse/gstamrparse.h:
* gst/amrparse/gstbaseparse.c:
* gst/amrparse/gstbaseparse.h:
Add two new baseparse based parsers (aac and amr) from Bug #518857.
2008-11-13 12:59:34 +00:00