After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 731286 - avauddec: Ensure input buffers have FF_INPUT_BUFFER_PADDING_SIZE padding
avauddec: Ensure input buffers have FF_INPUT_BUFFER_PADDING_SIZE padding
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal normal
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-05 18:48 UTC by Nicolas Dufresne (ndufresne)
Modified: 2015-08-16 13:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix input buffer padding (6.17 KB, patch)
2014-06-05 21:37 UTC, GstBlub
needs-work Details | Review

Description Nicolas Dufresne (ndufresne) 2014-06-05 18:48:48 UTC
The audio decoder is not using the base class to do allocation. This results in not operating an allocation query, which isn't ideal.

What need to be done, from my point of view, is move the code from gst_ffmpegauddec_negotiate() to be an override of GstAudioDecoder::negotiate, and then call gst_audio_decoder_negotiate() instead.

Doing this will ensure pending events are sent (avoid miss-ordering), will handle if caps didn't change, will run device_allocation() hence use the downstream allocator if any. It will also allow implement decided_allocation in a way that we can update the allocation params witch required alignement (15).

(If audio sink do have buffer pool, note that the base class does not use that at the moment.)
Comment 1 GstBlub 2014-06-05 21:37:17 UTC
Created attachment 277975 [details] [review]
Patch to fix input buffer padding

This patch adds input buffer padding (just like in gstavviddec.c), which is required by avcodec_decode_audio4().  However, the propose_allocation function doesn't get called, due to this bug.
Comment 2 Sebastian Dröge (slomo) 2014-06-06 11:30:52 UTC
Comment on attachment 277975 [details] [review]
Patch to fix input buffer padding

Looks good to me, but maybe we should refactor the code from here and the video decoder into a common function instead of duplicating it
Comment 3 Sebastian Dröge (slomo) 2015-06-30 17:07:04 UTC
Comment on attachment 277975 [details] [review]
Patch to fix input buffer padding

Does not apply to git master anymore. Can you update it? Also the decide_allocation() bit is irrelevant now as we don't implement get_buffer() or get_buffer2() anymore.
Comment 4 Sebastian Dröge (slomo) 2015-06-30 17:20:22 UTC
Ok, I did it now ;)

commit 30a4a28793f2e0ff08aaea368b7c14317ac2ca21
Author: Thomas Bluemel <tbluemel@control4.com>
Date:   Tue Jun 30 19:18:53 2015 +0200

    avauddec: Ensure input buffers have FF_INPUT_BUFFER_PADDING_SIZE padding, which is required by avcodec_decode_audio4 ()