avcodec/ffv1dec: move initial_states init to init_thread_copy()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/ffv1dec: reorganize thread init/update

This moves some allocations to init, reducing possible failure modes in update.
Always copies from the previous context instead of just during init

Fixes Ticket2923

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Read h264 headers from v4l2 to allow stream-copying.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
lavc: add teletext decoder using libzvbi

Based on a patch by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>.
http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2012-December/136677.html

The original patch was rebased by Tudor SUCIU <tudor.suciu@gmail.com>.

Lots of additional features and fixes are made by me.

Fixes ticket #2086.

Changes since last version:
- change default page to all pages

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avfilter/vf_fps: make sure the fifo is not empty before using it

Fixes Ticket2905

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Avoid a deadlock when decoding wma.

Fixes ticket #2925.
avcodec/pnmdec: use a more specific pointer type than void in samplecpy()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pnmdec: fix unaligned read

Fixes fate-lavf-pam on alpha

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/movenc: Use the rate from av_timecode_init_from_string() for tmcd

Fixes Ticket2892
Reveiwed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
vcr1: add sanity checks

Fixes invalid reads with corrupted files.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
pictordec: break out of both decoding loops when y drops below 0

Otherwise picmemset can get called with negative y, resulting in an
invalid write.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
pictordec: pass correct context to avpriv_request_sample

Fixes invalid reads.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
lavf: move a variable declaration to the block where it's used
lavf: avoid integer overflow when estimating bitrate

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
4xm: check that bits per sample is strictly positive

Avoids a divide by zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
ape demuxer: check for EOF in potentially long loops

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
cosmetics: Fix ATRAC codec name spelling
avpacket: Fixing side data copy when src == dst

Fixing av_packet_copy_side_data to work correctly when source and
destination are the same. This makes sure that there is no memory
leak and double frees.

Signed-off by: Vignesh Venkatasubramanian <vigneshv@google.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
w64dec: fix skipping of unknown guids

Regression since 14d50c1.
Fixes #2932.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
w64dec: fix end position of summarylist guid

Noticed-by: James Almer

Signed-off-by: Paul B Mahol <onemda@gmail.com>