flvdec: Don't read the VP6 header byte when setting codec type based on metadata

This header byte is only present when actually reading a VP6 frame,
not when reading the codec type field in the metadata. This
potential bug has been present since 5b54a90c.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
flvdec: Check the return value of a malloc

The callers of this function can't report errors sanely. If this
one malloc fails, don't write the extradata byte, make sure we
try to malloc it the next time we're called instead, and make sure
we still consume the input data byte.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
lavd/v4l2: copy frames into normally allocated packets whenever there is just one buffer left available

This will avoid the possibility that we dequeue more buffers than we
have obtained from the v4l2 driver.

Fixes ticket #1570

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
v4l2: fix regression that caused ffmpeg to occasionally get stuck

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
h264: do not copy ref count/ref2frm when updating per-frame context

They are filled in decode_slice_header() anyway.
h264: on reference overflow, reset the reference count to 0, not 1.

Since decode_slice_header() returns before the reference lists are
constructed, there are zero valid references.

CC:libav-stable@libav.org
h264: set ref_count to 0 for intra slices.

CC:libav-stable@libav.org
Merge commit 'c91c63b5380bf79655c09320774a022f84d76fd5'

* commit 'c91c63b5380bf79655c09320774a022f84d76fd5':
  flvdec: Don't read the VP6 header byte when setting codec type based on metadata

Conflicts:
	libavformat/flvdec.c

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

* commit 'e671d3ad6cd7fe1d02e9b35b889a25d8c059fce9':
  h264: do not copy ref count/ref2frm when updating per-frame context
  flvdec: Check the return value of a malloc

Conflicts:
	libavformat/flvdec.c

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

* commit '668e16a0dd1ff56d4beeff5c658d8a2a08dbfac8':
  h264: on reference overflow, reset the reference count to 0, not 1.

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  h264: set ref_count to 0 for intra slices.

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
er: Fix slice threading check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: print maxrss "-benchmark" data even on errors

Fixes Ticket2297

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavc/flacdec: Add frame CRC calculation

Fixes ticket #2266

Signed-off-by: James Almer <jamrial@gmail.com>
Avoid huge memory allocations from asf demuxer.

Fixes ticket #1888.
mjpegdec: fix endiansoup

Fixes Ticket2175

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
rtpdec: Initialize some variables to silence compiler warnings

The warnings are false positives, older gcc versions (such as 4.5)
think the variables can be used uninitialized while they in
practice can't, while newer (4.6) gets it right.

Signed-off-by: Martin Storsjö <martin@martin.st>
libxvid: remove temporary files at the end

Fixes Ticket924

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libxvid: use av_freep() for saftey

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libxvid: check & clear encoder_handle

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