qtdemux: Provide a 2 frames lead-in for audio decoders
authorMart Raudsepp <mart.raudsepp@collabora.com>
Wed, 5 Jun 2019 20:13:33 +0000 (23:13 +0300)
committerMart Raudsepp <mart.raudsepp@collabora.com>
Wed, 5 Jun 2019 20:13:33 +0000 (23:13 +0300)
commitcbfa4531ee5efe6a1c34ad7c9d241ab1bcd7a496
tree68b3122ff5dbb81426845f5cedd57bdabf91a7bf
parent9b348e755ca1aebbe772809ae058e9a9042ce123
qtdemux: Provide a 2 frames lead-in for audio decoders

AAC and various other audio codecs need a couple frames of lead-in to
decode it properly. The parser elements like aacparse take care of it
via gst_base_parse_set_frame_rate, but when inside a container, the
demuxer is doing the seek segment handling and never gives lead-in
data downstream.
Handle this similar to going back to a keyframe with video, in the
same place. Without a lead-in, the start of the segment is silence,
when it shouldn't, which becomes especially evident in NLE use cases.
gst/isomp4/qtdemux.c