baseparse: Fix push mode seeking (aacparse, amrparse)
authorRené Stadler <mail@renestadler.de>
Sun, 5 Apr 2009 00:50:19 +0000 (03:50 +0300)
committerRené Stadler <mail@renestadler.de>
Sun, 5 Apr 2009 02:26:09 +0000 (05:26 +0300)
commit0293f54d06916b3fca1d8dd526b25b92e2ee5f37
treeeb937c99fb0a50d7b2498a233ae2cee20acf4846
parent9c6e21d1f66366a9e22538b1aec3a842bd194fea
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).
gst/aacparse/gstbaseparse.c
gst/amrparse/gstbaseparse.c