avutil/avstring: do not lose ascii characters when decoding non utf-8 with av_utf8_decode()

Fixes Ticket3363

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/utils: Inject global side data into first packet.

This fixes replaygain handling in ffplay and probably other applications.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/utils: factorize if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/utils: reinject global side data on seeks

This fixes ffplay replaygain with seeking

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mp3enc: drop redundant and uninitialized variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/fft-test: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/psymodel: use av_malloc(z)_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/network: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/utils: prettify remap_deprecated_codec_id()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
fate/libswresample: add tests with filter_size=1 phase_shift=0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swresample/resample: Fix fractional part of index in the filter_size = 1 filters = 1 case

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swresample/resample: simplify index/consumed calculation for the filter = 1 case

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
rtmpproto: Make sure to pass on the error code if read_connect failed

Previously, if read_connect failed, the ret variable was unmodified
and had the value 0, indicating success, which then was returned from
the rtmp_open function, even though it actually failed.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
rtmpproto: Handle RTMP chunk size packets before the connect packet

In all other cases where ff_rtmp_packet_read is used, the packet returned
is passed to rtmp_parse_result more or less immediately. In this single
case, the content of the packet was required to be a connect packet.

Some clients, e.g. Open Broadcaster Software, send a chunk size packet
before the connect packet. If the first packet is a chunk size packet,
handle it and read another one, requiring this to be a connect packet
instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
dcadec: Delete redundant init_get_bits call

No initialization is needed in dca_decode_frame, because the next
thing it does is calling dca_parse_frame_header, which takes care of
the needed initialization.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Merge commit '6477139721f559b26eafd415e23e13ea2b0c27e1'

* commit '6477139721f559b26eafd415e23e13ea2b0c27e1':
  rtmpproto: Make sure to pass on the error code if read_connect failed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/rtmpproto: Added handling of an initial RTMP chunk size packet.

Fixes ticket #2911.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '4d40e073dcdef335215c124d340ea156bc4bdf13'

* commit '4d40e073dcdef335215c124d340ea156bc4bdf13':
  rtmpproto: Handle RTMP chunk size packets before the connect packet

Conflicts:
	libavformat/rtmpproto.c

See: 36b9c27dae452e10b4fff3d10f836160a5b8fbbd
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'b3d905b702dcdda9e3ae2bcb7b5580ca77a96ab7'

* commit 'b3d905b702dcdda9e3ae2bcb7b5580ca77a96ab7':
  dcadec: Delete redundant init_get_bits call

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Fix writing RGB 5:5:5 rawvideo into avi.

WMP expects bits per pixel to be set to 16 for RGB 5:5:5 rawvideo.