jpeg: don't directly access message, some message have args

This caused bogus messages, such as reported in bug #607471.
This commit is contained in:
Stefan Kost 2010-02-02 13:41:03 +02:00
parent 2514421c13
commit a9f5bbe1ff

View file

@ -1256,9 +1256,12 @@ wrong_size:
}
decode_error:
{
gchar err_msg[JMSG_LENGTH_MAX];
dec->jerr.pub.format_message ((j_common_ptr) (&dec->cinfo), err_msg);
GST_ELEMENT_ERROR (dec, STREAM, DECODE,
(_("Failed to decode JPEG image")),
("Error #%u: %s", code, dec->jerr.pub.jpeg_message_table[code]));
(_("Failed to decode JPEG image")), ("Error #%u: %s", code, err_msg));
if (outbuf) {
gst_buffer_unref (outbuf);
outbuf = NULL;