xl: K&R formatting cosmetics
xl: Fix the buffer size check

Also make it the first check.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
flac: use meaningful return values
qdm2: Whitespace cosmetics
aasc: Check minimum buffer size

Prevent some overreads.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
utvideoenc: use av_image_copy_plane()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
http: Support reading gzip/deflate compressed data

Derived from VLC's http module.
Original authors:
  Antoine Cellerier <dionoea@videolan.org>
  Sébastien Escudier <sebastien-devel@celeos.eu>
  Rémi Duraffort <ivoire@videolan.org>
  Rémi Denis-Courmont <remi@remlab.net>
  Francois Cartegnie <fcvlcdev@free.fr>

Normally, http servers shouldn't send this to us since we
don't advertise it with an Accept-Encoding header, but some
servers still do it anyway.

Signed-off-by: Martin Storsjö <martin@martin.st>
xl: Make sure the width is valid

And undo the wrong commit f1cb490d6d7391ff7e28cc376908cc98a652228d

CC: libav-stable@libav.org
oma: refactor seek function

Properly propagate seek errors from avio and the generic pcm seek.
oma: check geob tag boundary

Prevent read after buffer boundary on corrupted tag.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
oma: correctly mark and decrypt partial packets

Incomplete crypted files would lead to a read after buffer boundary
otherwise.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
pnm: fix 255 < maxval < 65535 for pam with depth 1

Signed-off-by: Paul B Mahol <onemda@gmail.com>
pnm: do not set avctx->coded_frame

Signed-off-by: Paul B Mahol <onemda@gmail.com>
truemotion2: make code independent of sizeof(AVFrame)

Signed-off-by: Paul B Mahol <onemda@gmail.com>
targaenc: remove unused TargaContext

Signed-off-by: Paul B Mahol <onemda@gmail.com>
lavf: Don't interpret just slightly broken timestamps as wraparound

This avoids breaking some slightly incorrect (dts > pts) timestamps
in sample HLS streams from Apple.

Signed-off-by: Martin Storsjö <martin@martin.st>
hls: Return all packets from a previous variant before moving on to the next one

This serves as a safeguard; normally we want to use the dts
comparison to interleave packets from all active variants. If that
dts comparison for some reason doesn't work as intended, make sure
that all packets in all variants for a certain sequence number have
been returned before moving on to the next one.

Signed-off-by: Martin Storsjö <martin@martin.st>
hls: Copy the time base from the chained demuxer

When a variant stream isn't mpegts but e.g. raw adts, the
default time base (90k) isn't correct.

Signed-off-by: Martin Storsjö <martin@martin.st>
hls: Don't check discard flags until the parent demuxer's streams actually exist

If passing the end of one segment while initializing the
chained demuxer, the parent demuxer's streams aren't set up
yet, so we can't recheck the discard flags.

Signed-off-by: Martin Storsjö <martin@martin.st>
hls: Set stream offset before opening a chained demuxer

This makes sure we don't accidentally check discard flags
for the wrong stream.

Signed-off-by: Martin Storsjö <martin@martin.st>