sipr: fall back to setting mode based on bit_rate.

Not all applications (e.g. MPlayer) set block_align, and
when using a different demuxer it might not even be
easily available.
So fall back to selecting mode based on bit rate as before
if block_align has not useful value.
It can't be worse than failing to decode completely.

(cherry picked from commit 1d0d63052b82c76e10c45cd38cdd27677de72e81)

CC: libav-stable@libav.org
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
lavf/oggdec: check for begin-of-stream flag in case of chained streams.

Fix Ticket #1617, revealing a regression I introduced in 8f3eebd.

We need to make sure no stream is added in between Ogg context save and
restore operations (because it would likely lead to a mismatch between
ogg->nstreams and AVFormatContext->nb_streams after the restore op).
This is the reason the ogg->state check is added in ogg_new_stream().
Before this patch, checking for ogg->headers was preventing this:
ogg->headers is always set before any ogg save/restore (though, it was
also preventing from creating the stream when necessary).
hqdn3d: Fix out of array read in LOWPASS

Fixes ticket1752

Commit message by commiter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
flac_parser: fix fifo ptr wrap check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
rtsp: kill a pointer type warning (void **) vs. (AVFormatContext **)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
rtsp: fix "warning: ret may be used uninitialized in this function"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pnmdec: use explicit casts to remove const to avoid warning with clang

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffprobe: add -bitexact boolean option

The option is mostly useful to make ffprobe output independent from the
build, and in particular to fix FATE --enable-small failures.
ffprobe: reindent after the previous commit
tests: update fate-ffprobe test to make use of -bitexact flag

Should fix tests with --enable-small.
lavfi/buffersink: fix check on pixel_fmts in the opaque parameter

Fix programmatic selection of accepted pixel formats.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
rawdec: fix "warning: assignment from incompatible pointer type"

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

* qatar/master:
  sipr: fall back to setting mode based on bit_rate.

Conflicts:
	libavcodec/sipr.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec: fix memleak in avcodec_encode_audio2()

Ensure that padded_frame is freed before returning when needed.
ffmpeg: fix overriding codecs with the new syntax

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg/opt_preset: update to new option API for reading codec names.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: dont match unspecified media types in MATCH_PER_TYPE_OPT

This would change existing behavior, and should if done, done seperately.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg/opt_output_file: extract subtitle codec name through new API

This should fix specifying subtitle codecs with the new syntax in some cases.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: remove now unneeded old *_codec_name code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: fix 10l (use of uninitilaized variable)

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