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
h263dec: call get_format() on resolution changes

Fail safe if the pixel format changes.