mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
flacdec: Only flush the FLAC decoder if it wasn't created right before
If the FLAC decoder is flushed, its state will be set to frame-sync mode, which will sync to the next *audio* frame and makes it ignore all headers. This prevented tags and everything else to show up when using flacdec in push mode. Fixes bug #608843.
This commit is contained in:
parent
e1c577c6e7
commit
27b203b030
1 changed files with 3 additions and 5 deletions
|
@ -1271,8 +1271,8 @@ gst_flac_dec_chain (GstPad * pad, GstBuffer * buf)
|
|||
dec = GST_FLAC_DEC (GST_PAD_PARENT (pad));
|
||||
|
||||
GST_LOG_OBJECT (dec, "buffer with ts=%" GST_TIME_FORMAT ", end_offset=%"
|
||||
G_GINT64_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
|
||||
GST_BUFFER_OFFSET_END (buf));
|
||||
G_GINT64_FORMAT ", size=%u", GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
|
||||
GST_BUFFER_OFFSET_END (buf), GST_BUFFER_SIZE (buf));
|
||||
|
||||
if (dec->init) {
|
||||
GST_DEBUG_OBJECT (dec, "initializing decoder");
|
||||
|
@ -1286,9 +1286,7 @@ gst_flac_dec_chain (GstPad * pad, GstBuffer * buf)
|
|||
}
|
||||
GST_DEBUG_OBJECT (dec, "initialized (framed=%d)", dec->framed);
|
||||
dec->init = FALSE;
|
||||
}
|
||||
|
||||
if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT)) {
|
||||
} else if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT)) {
|
||||
/* Clear the adapter and the decoder */
|
||||
gst_adapter_clear (dec->adapter);
|
||||
FLAC__stream_decoder_flush (dec->decoder);
|
||||
|
|
Loading…
Reference in a new issue