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>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  ogg: Fix potential infinite discard loop

No change as this commit has been part of ffmpeg since a while already

See: d7b542ae294aaf818f2a00c5606e009cf931e77c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
matroskaenc: remove unneeded wavpack tag

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Revert "doc/RELEASE_NOTES: add a note about AVISynth"

This reverts commit 3aa2257d240a5a0eb94014b9113dd91730786886.
mkv: Refactor mkv_write_packet

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
swscale: set dither to a specific value for rgb/bgr8 output

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swscale: improve dither checks

Bssed on patch by Øyvind Kolås <pippin@gimp.org>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/matroskadec: add WebVTT support

WebM files now support inband text tracks, as described in the
following specification:

http://wiki.webmproject.org/webm-metadata/temporal-metadata/webvtt-in-webm

The Matroska demuxer now detects the presence of WebVTT tracks,
synthesizing WebVTT packets (having codec id AV_CODEC_ID_WEBVTT) and
pushing them downstream in the normal way.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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>
mpegvideo: Use picture_ptr instead of picture in ff_mpeg_draw_horiz_band()

Fixes strides and issue with mplayer and mpeg2 field pictures

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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.
ffv1: rename minor to micro version

the version is 1.3.4 which makes 4 micro and not minor

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '148fbdd1c2a2a88a78ba9fd152c81c840bdb205a'

* commit '148fbdd1c2a2a88a78ba9fd152c81c840bdb205a':
  mkv: Refactor mkv_write_packet

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '98308bd44face14ea3142b501d16226eec23b75a'

* commit '98308bd44face14ea3142b501d16226eec23b75a':
  mkv: Add options for specifying cluster limits

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '59f595921eb2b848a80a74aa81b6bb43038c9ebe'

* commit '59f595921eb2b848a80a74aa81b6bb43038c9ebe':
  mkv: Flush the old cluster before writing a new one

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'b886f5c2f1e71b3e60e4265c500158d392b4b9a4'

* commit 'b886f5c2f1e71b3e60e4265c500158d392b4b9a4':
  mkv: Allow flushing the current cluster in progress

Conflicts:
	libavformat/matroskaenc.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>