gstbasesrc: get_size() -> FALSE still causes duration queries to be answered
The default handler of duration queries in gstbasesrc returns TRUE if the subclass didn't set a size, returning -1 as the duration. This is the case even though when the duration format doesn't match, e.g. a TIME duration query is made, but the format of the basesrc is BYTES.
Examples of this happening:
filesrc location=<(cat anything)
-
souphttpsrc
when the resource doesn't set a Content-Length
This breaks duration queries for qtdemux in cases like the above.
When receiving a duration query, qtdemux first forwards it upstream, and if it receives a success, it returns that value as the result. Only when that fails it will look at the duration encoded in the MP4 file and return that.