When libavformat was changed to use the new avpriv_open function
in 51eb213d00, this silently bypassed the existing wrapper for
win32. Move the win32 wrapper into libavutil/file.c to make sure
it gets called everywhere (not just in the libavformat case).
This makes sure that non-ascii file names gets opened properly
(where file names internally are stored as utf8, but they get
converted to wchar_t and opened with _wsopen).
Signed-off-by: Martin Storsjö <martin@martin.st>
Such buffers are not malloced thus freeing would be bad.
Note though this condition never could have happened so this
is more for correctness sake and not a true bugfix
Fixes CID1061047
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '218d6844b37d339ffbf2044ad07d8be7767e2734':
h264dsp: Factorize code into a new function, h264_find_start_code_candidate
Conflicts:
libavcodec/h264_parser.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '7a82022ee2f9b1fad991ace0936901e7419444be':
h264_parser: Initialize the h264dsp context in the parser as well
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '0f1fb6c0194c85483dedb93b20a5b76f6fc9d520':
libavutil: Don't use fcntl if the function does not exist
cmdutils: Only do the windows-specific commandline parsing on _WIN32
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* 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>
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>
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>
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>
* commit '869b04e89154cd92d2bcfdabcecbe3217864c099':
libavutil: add avpriv_open() to open files with close-on-exec flag
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* 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>
* commit 'f4d371b9737c0405b3bc46d7ca0c856c0a8616b1':
rtsp: Don't include the listen flag in the SDP demuxer flags
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This provides at least some protection against potential accidental
corruption of AVIO buffer workspace.
Signed-off-by: Martin Storsjö <martin@martin.st>
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>
* cigaes/master:
ffmpeg: remove obsolete workaround in trim insertion.
lavu/log: do not skip overwritten lines.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The bug it was working seems to have been fixed.
This change causes ffmpeg to use the trim filter to implement
the -t option.
FATE tests are updated due to the more accurate handling of
the last packets.
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>
* commit '62572435d4106098c090fb8f129a9090e41ff1eb':
rtpenc_chain: Check for errors from ffio_fdopen and ffio_open_dyn_packet_buf
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'f542dedf72091af8e6f32a12bd64289c58857c21':
rtspenc: Check the return value from ffio_open_dyn_packet_buf
Merged-by: Michael Niedermayer <michaelni@gmx.at>
'Fixes' ticket #2526 insofar as it stops 2.5.8 from crashing and
tells the user to upgrade to 2.6 if they want to make video input
work. A real solution to #2526 would be to get video input from
2.5.8 to work right.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>