GNOME Bugzilla – Bug 666579
[a52dec] behavior changed since porting to audiodecoder
Last modified: 2011-12-20 12:01:22 UTC
Created attachment 203938 [details] AC3 sample to reproduce the problem Thanks for porting a52dec to audioencoder. But it seems that the behavior changed about "discont" buffers. * Steps to reproduce: gst-launch-0.10 filesrc location=sample.ac3 ! ac3parse ! a52dec ! fakesink * Actual result: GstPipeline:pipeline0/GstA52Dec:a52dec0: Could not decode stream * Previsous result: No error * Other informations: The check around "if (a52_block (a52dec->state))" and "if (a52_frame)" is now a GST_AUDIO_DECODER_ERROR. Previously it was a GST_WARNING with a discont=TRUE. Also the line "GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);" disappeared.
Created attachment 203940 [details] [review] check that a52_init return a valid a52 state This check has been deleted when porting to audioencoder
Created attachment 203943 [details] [review] a52dec: check that a52_init returns a valid state Same as previous patch, but with a minor nitpick on the error code adjusted.
Thanks, committed: commit 24fca6cde5bde1ff679433c0744add20255bb04a Author: Julien Isorce <julien.isorce@gmail.com> Date: Tue Dec 20 11:54:38 2011 +0100 a52dec: check that a52_init returns a valid a52 state
As for the remaining behaviour; the old one was not entirely nice/ok, as it would totally ignore errors and possibly carry on indefinitely. Evidently, the new is not quite convenient either giving up at the first sign of trouble. Following minor -base commit to audiodecoder arranges for intended behaviour, which is to only really give up in seriously problematic cases (ongoing errors). The remaining discont marking/handling is all done automagically by the specialized GST_AUDIO_DECODER_ERROR macro and the rest of buffer handling code. ---- commit c41f3cbef03417c3025b145122788502764313ad Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Tue Dec 20 12:42:18 2011 +0100 audiodecoder: set a non-zero default maximum tolerated errors Whereas the previous default 0 was backwards compatible in that it lead to erroring out immediately upon any error, elements that are really ported and using the base class error macro can be assumed to intend to improve behaviour rather than maintaining the old one. So, make it easy on those and any future one and tolerate some errors by default, as intended. Fixes #666579. ... and in 0.10 release branch ... commit 10aabf623abfa17b29a1e65d403923e36716c3a7 Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Tue Dec 20 12:42:18 2011 +0100 audiodecoder: set a non-zero default maximum tolerated errors Whereas the previous default 0 was backwards compatible in that it lead to erroring out immediately upon any error, elements that are really ported and using the base class error macro can be assumed to intend to improve behaviour rather than maintaining the old one. So, make it easy on those and any future one and tolerate some errors by default, as intended. Fixes #666579.