On Thu, 16 Oct 2014, Uwe L. Korn wrote:

On 15/10/14 12:06, Martin Storsjö wrote:
On Tue, 14 Oct 2014, Uwe L. Korn wrote:

In (non-live) streams with no metadata, the duration of a stream can

I assume it doesn't hurt in case this is sent for a live stream, i.e.
it's ignored and/or returns 0 in those cases as well?


I had no live stream to test with, but with invalid playpaths, I always
got a duration of 0 replied from the server. Not sure if different
implementations will answer something else but I don't expect any server
to reply with a positive number where the stream has no duration.

But sending it for a live stream just sounds like unnecessary overhead
as we already know that we'll get no valid duration and thus just spent
a bit more time for initiating the stream which we do not need.

My point is, you send it if rt->live != -1; where -1 corresponds to "live", but the default is -2, and for _most_ live streams I've seen, you don't need to set it (the default works fine). So for the case when you connect to a rtmp url not knowing what it is, having rt->live set to the default, the getStreamLength packet will be sent, which shouldn't hopefully do any major harm if it turns out it actually was a live stream.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to