avcodec/jpeg2000dec: fix near null pointer dereference

Fixes Ticket2840

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Warn the user if a pix_fmt != yuv420p was chosen for MPEG-2 video encoding.

Fixes ticket #2870.
avformat/mpegts: print packet size warning only if new size differs from old

No case is known to have triggered this, but its more correct to check that the
new size differs.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mpegts: fix pos47_full

The value was off by a packet

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mpegts_get_pcr: dont loose a packet when resyncing

This matches how read_packet() works

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mpegts: resync from the smallest packet size on

This avoids the loss of a packet in many cases if the packet size was wrong.
It also improves detection of packet size changes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fix frame width and height for some targa_y216 samples.

Fixes ticket #2864.
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.