ismindex: handle discontinuous streams better

Read the fragment duration from the trun sample data, rather than
assuming that there are no gaps.

Signed-off-by: Martin Storsjö <martin@martin.st>
w32pthreads: use the CONDITION_VARIABLE typedef if available

This silences warnings about passing arguments from incompatible pointer type
when targeting Windows Vista or newer.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
w32pthreads: use the condition variable API directly when targeting newer versions of Windows

Wrap the function calls in a similar fashion to how it's being done
with the critical section API.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
lavf: More informative error message

Print the timestamp values and not just the stream index.
sctp: Use AVERROR_BUG instead of abort()

Trying to write to a stream id larger the the maximum requested is
a programming error, still there is no reason to leave a
reachable abort() in the codebase.

CC: libav-stable@libav.org
rtsp: Check for command strings without spaces

Prevent a NULL-pointer dereference.

CC: libav-stable@libav.org
rtsp: Support tls-encapsulated RTSP
rtsp: Support tls when in listen mode
rtsp: Add rtsps to the probe
tls: Support passing old-style tcp options

Make tcp and tls urls near-interchangeable.
tcp: Add AVOption support
lavf: Don't drop both pts and dts if timestamps are invalid

In these cases, only drop dts. Because if we drop both we have no
timestamps at all for some files.

This improves playback of HLS streams from GoPro cameras.

Signed-off-by: Martin Storsjö <martin@martin.st>
smoothstreamingenc: Simplify code by removing a redundant variable

Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Adjust edit lists to trim out parts of tracks with negative pts

This makes sure that audio preroll for e.g. AAC is signaled correctly.

Previously we only wrote the edit list correctly if we had negative
dts but started with pts == 0 (e.g. for video with B-frames).

Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Add some comments explaining subtle details in writing the edit lists

Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Write edit lists for fragmented files as well, if necessary

This is necessary to get the right timestamp offset for content
that starts with dts != 0.

This currently only helps when writing fragmented files with a non-empty
moov atom. When writing an empty moov atom, we don't have any packets
yet, so we don't know the starting dts for the tracks.

Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Print a warning for an unhandled case of nonzero start dts with empty_moov

Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Simplify code by using an existing local pointer

Signed-off-by: Martin Storsjö <martin@martin.st>
icecast: Do not use chunked post

Icecast uses HTTP 1.0 while Libav uses HTTP 1.1 and enables by
default chunked post.

Icecast actually forwards the HTTP chunk headers to the listener
as part of the media stream (without the chunk encoding HTTP headers)
causing the players to lose sync.

Disabling the option is enough to feed icecast properly.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
h263dec: call get_format after setting resolution and profile

Bug-Id: 541