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>
avutil/fifo: assert that theres enough data in the fifo on drain calls.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avfilter/vf_yadif: reallocate frames if strides differ

Fixes Ticket2896

An alternative to this would be to change the code to support any
stride.
The condition of differing strides should be rare.
If theres no speedloss supporting any stride would be better

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
movenc: Don't flush after each written packet

This should improve write performance quite significantly.
---
Tested with both writing a normal mp4, by using the faststart
feature and writing a fragmented mp4 file; all turn out with the
same md5sum as before.

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit '8aba7968dd604aae91ee42cbce0be3dad7dceb30'

* commit '8aba7968dd604aae91ee42cbce0be3dad7dceb30':
  vcr1: add sanity checks

Conflicts:
	libavcodec/vcr1.c

See: 845724c82c1a732ab398c9e8cedd178f96f1626d
See: 8e09482e4d27d65bbce2ce5c2f4392216011ed09
Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/vcr1: replace redundant checks from libav (8aba7968dd604aae91ee42cbce0be3dad7dceb30)  by asserts

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

* commit '5f7aecde02a95451e514c809f2794c1deba80695':
  pictordec: break out of both decoding loops when y drops below 0

Conflicts:
	libavcodec/pictordec.c

The added check is redundant.
It shows the error path more clearly though

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

* commit 'fe9bb61f9a16be19ad91875632c39e44b7a99a8a':
  pictordec: pass correct context to avpriv_request_sample

Conflicts:
	libavcodec/pictordec.c

No change as the avpriv_request_sample() has already been replaced by an implementation
of the codepath.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
riff: add 0x64 to g726 works on g726-test1.wav