rtsp: Don't include the listen flag in the SDP demuxer flags

It's only relevant for the RTSP demuxer. Similarly, the custom_io
flag is only present in the SDP demuxer options list.

Signed-off-by: Martin Storsjö <martin@martin.st>
mpegvideo_enc: drop outdated copy_picture_attributes() in favour of a modern av_frame_copy_props()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavutil: add avpriv_open() to open files with close-on-exec flag

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavutil: use avpriv_open()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec: use avpriv_open()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavdevice: use avpriv_open()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavformat: use avpriv_open()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
cmdutils: Only do the windows-specific commandline parsing on _WIN32

Fixes commandline parsing on Cygwin (on 64 bit, and on very recent
32 bit), where the configure check does find the CommandLineToArgvW
function (since it exists in the link libraries and in the headers),
but whose GetCommandLineW() only returns the application's path.
(This is due to a cygwin internal optimization, see
http://cygwin.com/ml/cygwin/2013-07/msg00538.html for details.)
Arguments are only given through main's argc/argv, and they're already
UTF-8.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavutil: Don't use fcntl if the function does not exist

Not all platforms have the function.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
avio: Add const qualifiers to ffio_read_indirect

This provides at least some protection against potential accidental
corruption of AVIO buffer workspace.

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

* commit 'f4d371b9737c0405b3bc46d7ca0c856c0a8616b1':
  rtsp: Don't include the listen flag in the SDP demuxer flags

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

* commit '22c879057ead189c0f59241cb9eeb926381e3299':
  mpegvideo_enc: drop outdated copy_picture_attributes() in favour of a modern av_frame_copy_props()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Voxware MetaSound decoder
Merge commit '869b04e89154cd92d2bcfdabcecbe3217864c099'

* commit '869b04e89154cd92d2bcfdabcecbe3217864c099':
  libavutil: add avpriv_open() to open files with close-on-exec flag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
h264_parser: Initialize the h264dsp context in the parser as well

Each AVStream struct for an H.264 elementary stream actually has two
copies of the H264DSPContext struct (and in fact all the other members
of H264Context as well):

((H264Context *) ((AVStream *)st)->codec->priv_data)->h264dsp
((H264Context *) ((AVStream *)st)->parser->priv_data)->h264dsp

but only the first of these was actually being initialised. This
prevented the addition of platform-specific implementations of
parser-related functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
h264dsp: Factorize code into a new function, h264_find_start_code_candidate

This performs the start code search which was previously part of
h264_find_frame_end() - the most CPU intensive part of the function.

By itself, this results in a performance regression:
              Before          After
              Mean   StdDev   Mean   StdDev  Change
Overall time  2925.6 26.2     3068.5 31.7    -4.7%

but this can more than be made up for by platform-optimised
implementations of the function.

Signed-off-by: Martin Storsjö <martin@martin.st>
arm: Add assembly version of h264_find_start_code_candidate

               Before          After
               Mean   StdDev   Mean   StdDev  Change
This function   508.8 23.4      185.4  9.0    +174.4%
Overall        3068.5 31.7     2752.1 29.4     +11.5%

In combination with the preceding patch:
                Before          After
                Mean   StdDev   Mean   StdDev  Change
Overall         2925.6 26.2     2752.1 29.4     +6.3%

Signed-off-by: Martin Storsjö <martin@martin.st>
libavutil: Don't use fcntl if the function does not exist

Not all platforms have the function.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit '880391ed2d2faf796ca3a16f63cec69767546a21'

* commit '880391ed2d2faf796ca3a16f63cec69767546a21':
  libavutil: use avpriv_open()

Conflicts:
	libavutil/random_seed.c

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

* commit 'fee9db1fdf921295233e94cbe2769f9cd722206d':
  libavcodec: use avpriv_open()

Conflicts:
	libavcodec/libxvid_rc.c

The changed code does not exist in ffmpeg anymore, thus nothing is
changed.

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