aacparse: When parsing raw input, accept frames of any size
authorJan Alexander Steffens (heftig) <jsteffens@make.tv>
Thu, 18 Jan 2018 13:23:07 +0000 (14:23 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 18 Jan 2018 19:09:19 +0000 (19:09 +0000)
commite273e5f7a6295425fe9749724ff5b95c751842ed
tree92a78e2f078704ce08871eaae4dedd29e1f29275
parentc0195300919af46964884de6b4bbd5df7fb8c211
aacparse: When parsing raw input, accept frames of any size

Raw AAC streams might have very small frames, e.g. 6 byte frames
when encoding silence. These frames are then smaller than aacparse's
default min_frame_size of 10 bytes (ADTS_MAX_SIZE).

When passthrough is disabled or aacparse has to output ADTS, GstBaseParse
will concatenate these short frames to the following frame before
handling them to aacparse, which processes each input buffer as a single
frame, producing bad output.

To avoid this problem, set the min_frame_size to 1 when receiving a raw
stream.

https://bugzilla.gnome.org/show_bug.cgi?id=792644
gst/audioparsers/gstaacparse.c