h261: check the mtype index

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
dxa: Make sure the reference frame exists

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
dxa: fix decoding of first I-frame by separating I/P-frame decoding

5ef7c84 broke decoding for the first keyframe due to an unnecessary
check for a reference frame.

CC: libav-stable@libav.org
movenc: Indicate that negative timestamps are supported

The mov/mp4 muxer has support for handling negative timestamps
via edit lists (which customarily is used for handling the 1-frame
delay due to B-frames as well).

Using the muxer's native way of handling it is better than using
the generic offsetting. The generic offsetting is a bit too
crude when e.g. the timebase of one track is 1/fps, where the
edit lists can handle it accurately.

Signed-off-by: Martin Storsjö <martin@martin.st>
ogg: Fix potential infinite discard loop

Seeking in certain broken files would cause ogg_read_timestamp
to fail because ogg_packet would go into a state where all packets
of stream 1 would be discarded until the end of the stream.

Bug-Id: 553
CC: libav-stable@libav.org

Signed-off-by: Jan Gerber <j@v2v.cc>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
mkv: Refactor mkv_write_packet

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
mkv: Add options for specifying cluster limits

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
mkv: Flush the old cluster before writing a new one

This simplifies keeping track of cluster boundaries for e.g.
livestreaming of WebM.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
mkv: Allow flushing the current cluster in progress

Allow emitting the current cluster that is being written before
starting a new one, simplifying how to figure out where clusters
are positioned in the output stream (for live streaming).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
mov: Set the timescale for data streams

Data streams have a defined timebase, do not ignore it.
mov: Compute max duration among the tracks with a timescale

Prevent an assert.
mov: Prevent segfaults on mov_write_hdlr_tag

Do not segfault when writing tracks such as tmcd by writing them down
as generic DataHandlers if not known.
avformat: Fix references to removed av_close_input_file in Doxygen
movenc: Allow chapter track in default MODE_MP4

Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: Allow chapters to be written in trailer

This allows creation of frame accurate chapter marks from sources
like DVD and BD where the precise chapter location is not known until
the chapter mark has been reached during reading.

Signed-off-by: Martin Storsjö <martin@martin.st>
avcodec: Remove some commented-out debug cruft
vf_fps: add 'start_time' option

This allows for dropping or duplication to match a particular start time.
Add a libfdk-aac decoder

This can be useful for decoding AAC object types that are not supported
by the native AAC decoder, e.g. AAC-LD and AAC-ELD.
h264data: Remove unused luma_dc_field_scan table
h264data: Move some tables to the only place they are used