gstbaseparse buf DISCONT issue
Submitted by Lyon
When we are update gstreamer from 1.4.5 to 1.6, we found some clips with mp3 audio cannot be played.
So we have a check and found that in gstbaseparse, there may be some modification can be made.
In gstbaseparse, The chain in buffer is pushed into adapter, and then send to subclass by tmpbuf (gstbuffer) frame by frame.
There is a commit which use new API to get buffer from adapter.
Author: Sebastian Dr枚ge email@example.com
Date: Tue Jun 30 11:18:24 2015 +0200
baseparse: Use new gst_adapter_get_buffer() API instead of gst_adapter_map()
This preserves GstMeta properly unless the subclass does special things
and The gst_adapter_get_buffer() will preserve all meta in adapter including GST_BUFFER_FLAG_DISCONT flag. So if the first chain in buffer contains several frames, these several frames will be sent to downstream with DISCONT flag.
However, the DISCONT flag is only needed for the first frame push to downstream, if the 2nd frame (and after 2nd frame) includes DISCONT flag, then audiodecoder may do flush operation, and which can make audio decoder subclass can not get enough data.