• Sebastian Dröge's avatar
    flacparse: Drain the parser when a CAPS event is received · c3373976
    Sebastian Dröge authored
    After a CAPS event, in theory a new stream can start and it might start
    with the FLAC headers again. We can't detect FLAC headers in the middle
    of the stream, so we drain the parser to be able to detect either FLAC
    headers after the CAPS event or the continuation of the previous stream.
    
    This fixes for example
    
    gst-launch-1.0 audiotestsrc num-buffers=200 ! flacenc ! c. \
        audiotestsrc num-buffers=200 freq=880 ! flacenc ! c. \
        concat name=c ! rtpgstpay ! udpsink host=127.0.0.1 port=5000
    
    gst-launch-1.0 udpsrc multicast-group=127.0.0.1 port=5000 \
        caps=application/x-rtp,media=application,clock-rate=90000,encoding-name=X-GST ! \
        rtpgstdepay ! flacparse ! flacdec ! audioconvert ! pulsesin
    c3373976
gstflacparse.c 58.8 KB