discoverer: try harder to obtain a duration if we don't get one right away
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 14 Feb 2012 19:23:27 +0000 (19:23 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 14 Feb 2012 19:36:43 +0000 (19:36 +0000)
commite40ea309721eff8e1168844d81e2ca515e7acb6d
tree965c29dc25047fa21bbee8f98dc0fabc5417c406
parente832929080de83454cf4dac0f5aa194a3e0874ca
discoverer: try harder to obtain a duration if we don't get one right away

If we don't get a duration right away, set the pipeline to playing
and sleep a bit, then try again. This is ugly, but the least worst
we can do right now. The alternative would be to make parsers etc.
return some bogus duration estimate even after only having pushed
a single frame, for example.

Fixes discoverer showing 0 durations for some mp3 and aac files
(e.g. soweto-adts.aac).
gst-libs/gst/pbutils/gstdiscoverer.c