opusenc: moan if we get an unexpected amount of data

https://bugzilla.gnome.org/show_bug.cgi?id=660364
This commit is contained in:
Vincent Penquerc'h 2011-09-28 14:56:18 +01:00 committed by Sebastian Dröge
parent f9d4dd5215
commit f70c921ff9

View file

@ -842,6 +842,12 @@ gst_opus_enc_encode (GstOpusEnc * enc, gboolean flush)
GST_ERROR_OBJECT (enc, "Encoding failed: %d", outsize);
ret = GST_FLOW_ERROR;
goto done;
} else if (outsize != bytes_per_packet) {
GST_WARNING_OBJECT (enc,
"Encoded size %d is different from %d bytes per packet", outsize,
bytes_per_packet);
ret = GST_FLOW_ERROR;
goto done;
}
GST_BUFFER_TIMESTAMP (outbuf) = enc->start_ts +