jpegdec: fix bogus warning about discont flag on first buffer

The very first buffer should always have the DISCONT flag set, no
need to warn about that. Only warn if we get a DISCONT buffer in
non-packetised mode and we already have some data.
This commit is contained in:
Tim-Philipp Müller 2009-10-13 01:02:15 +01:00
parent 6ae6af9dab
commit 87bd79f4ba

View file

@ -902,7 +902,7 @@ gst_jpeg_dec_chain (GstPad * pad, GstBuffer * buf)
if (GST_BUFFER_IS_DISCONT (buf)) {
GST_DEBUG_OBJECT (dec, "buffer has DISCONT flag set");
dec->discont = TRUE;
if (!dec->packetized) {
if (!dec->packetized && dec->tempbuf != NULL) {
GST_WARNING_OBJECT (dec, "DISCONT buffer in non-packetized mode, bad");
gst_buffer_replace (&dec->tempbuf, NULL);
}