| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
command.c
mp_core.h
mplayer.c
screenshot.c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Windows uses a legacy codepage for char* / runtime functions accepting
char *. Using UTF-8 as the codepage with setlocale() is explicitly
forbidden.
Work this around by overriding the MSVCRT functions with wrapper
macros, that assume UTF-8 and use "proper" API calls like _wopen etc.
to deal with unicode filenames. All code that uses standard functions
that take or return filenames must now include osdep/io.h. stat()
can't be overridden, because MinGW-w64 itself defines "stat" as a
macro. Change code to use use mp_stat() instead.
This is not perfectly clean, but still somewhat sane, and much better
than littering the rest of the mplayer code with MinGW specific hacks.
It's also a bit fragile, but that's actually little different from the
previous situation. Also, MinGW is unlikely to ever include a nice way
of dealing with this.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some of the code, especially the dshow and windows codec loader parts,
are extremely hacky and likely full of bugs. The goal is merely getting
rid of warnings that could obscure more important warnings and actual
bugs, instead of fixing actual problems. This reduces the number of
warnings from over 500 to almost the same as when compiling on Linux.
Note that many problems stem from using the ancient wine-derived
windows headers. There are some differences to the "proper" windows
header. Changing the code to compile with the proper headers would be
too much trouble, and it still has to work on Unix.
Some of the changes might actually break compilation on legacy MinGW,
but we don't support that anymore. Always use MinGW-w64, even when
compiling to 32 bit.
Fixes some warnings in the win32 loader code on Linux too.
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
mplayer.c
screenshot.c
|
| |
| |
| |
| | |
libmpdemux/aviheader.c:235:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
|
| |
| |
| |
| |
| |
| |
| |
| | |
demux_lavf was returning a static size value when libavformat queried
file size with AVSEEK_SIZE. Add code to query the stream for possibly
changed value first. This at least improves seeking with growing MPEG
files; before seeks would never go beyond the part of the file that
existed when the stream was first opened.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the private bswap and intreadwrite.h implementations and use
libavutil headers instead.
Originally these headers weren't publicly installed by libavutil at
all. That already changed in 2010, but the pure C bswap version in
installed headers was very inefficient. That was recently (2011-12)
improved and now using the public bswap version probably shouldn't
cause noticeable performance problems, at least if using a new enough
compiler.
|
| |
| |
| |
| |
| |
| | |
Change demux_lavf to use CodecID -> RIFF tag mappings that are now
available through the public Libav API. Previously it used a copy in
ffmpeg_files/taglists.c. That can now be deleted.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change various code to use the latest Libav API. The libavcodec
error_recognition setting has been removed and replaced with different
semantics. I removed the "--lavdopts=er=<value>" option accordingly,
as I don't think it's widely enough used to be worth attempting to
emulate the old option semantics using the new API. A new option with
the new semantics can be added later if needed.
Libav dropped APIs that were necessary with all Libav versions
until quite recently (like setting avctx->age), and it would thus not
be possible to keep compatibility with previous Libav versions without
adding workarounds. The new APIs also had some bugs/limitations in the
recent Libav release 0.8, and it would not work fully (at least some
avcodec options would not be set correctly). Because of those issues,
this commit makes no attempt to maintain compatibility with anything
but the latest Libav git head. Hopefully the required fixes and
improvements will be included in a following Libav point release.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ensure that chapters are sorted by time. There are some broken mkv
files that have chapters in random order. Using simple chapter
skipping with the seek_chapter slave command is very confusing and
just doesn't work if the chapters are not in order.
The chapters are resorted every time a chapter is added, that would
make the chapter list unsorted. While this is algorithmically very
stupid, it doesn't require changes per demuxer, or reasoning when
exactly chapters could be added. Turning this into an insertion sort
isn't worth the code, and the added demuxer_sort_chapters() function
could possibly be moved to the "right" place later.
This is not done when ordered chapters are used, because timeline
support uses different data structures for chapters.
|
| |
| |
| |
| |
| |
| |
| | |
This was caused by a demuxer trying to undo the header read when probing
for its file format. This is pointless in any case, because the core
demuxer code seeks back to the start of the file when initializing a
demuxer.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Playing a .cue file directly will now parse the .cue file, and load and
play the file(s) referenced in the cue. If multiple files are referenced,
a timeline including all files will be created to create the impression
of a single, flat audio file containing all the tracks.
For each track, a chapter is created. The chapter navigation commands can
be used to jump between tracks. The chapter titles will use the string
provided by the track's TITLE cue command. (The -identify command can be
used to print all chapters in a not so user friendly way.)
Other than the chapter names, there is no attempt at displaying or exposing
any other meta data contained in the cue files yet.
The handling (or lack of thereof) of gaps (track pregaps and postgaps) is
probably not correct yet. In general, mplayer's mapping of tracks to the
source audio files can be verified by examining the timeline, which will
be printed when passing the -v switch.
Note that this has nothing to do with the old cue:// support. The old code
isn't touched, and is still only able to play .cue/.bin pairs. Prefixing a
.cue file with cue:// will always invoke the old code, while playing a .cue
file directly (i.e. "mplayer file.cue") will always use the new code.
Playing audio images (.cue/.bin pairs of files) doesn't work yet.
|
|
|
|
|
| |
Pass avpacket->side_data when using a libavcodec audio decoder
together with libavformat demuxer (this was already done for video).
|
|
|
|
|
|
|
|
| |
Update various code using Libav libraries to remove use of API
features that were deprecated at Libav release 0.7. I think this
removes them all with the exception of URLContext functions still used
in stream_ffmpeg.c (at least other uses that generated deprecation
warnings with libraries from 0.7 are removed).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Require versions of the Libav libraries corresponding to Libav release
0.7. These are:
libavutil 51.7.0
libavcodec 53.5.0
libavformat 53.2.0
libswscale 2.0.0
libpostproc 52.0.0
Also disable the fallback to simple header check if these libraries
could not be found with pkg-config; now compiling without pkg-config
support for these always requires explicitly setting --enable-libav
and any needed compiler/linker flags. The simple check would have let
compilation proceed even if a version mismatch was detected.
|
|
|
|
|
| |
Remove support for building the player without libavcodec and
libavformat. These libraries are now always required.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Information about individual chapters was printed during demuxer
opening phase, and total chapter count (ID_CHAPTERS) was printed
according to mpctx->demuxer->num_chapters. When playing a file with
ordered chapters, this meant that chapter information about every
source file was printed individually (even though only the chapters
from the first file would be used for playback) and the total chapter
count could be wrong. Remove the printing of chapter information from
the demuxer layer and print the chapter information and count actually
used for playback in core print_file_properties().
Also somewhat simplify the internal chapters API and remove possible
inconsistencies.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Demux_demuxers checked a pts value against 0 to see if it was unset,
but other code uses MP_NOPTS_VALUE for that now. As a result audio and
subtitle streams could seek to a large negative position (effectively
to 0) instead of the correct target position. This broke --audiofile;
the --initial-audio-sync code could compensate for wrong demuxer seek
up to 5 minutes from the start of the file, masking the bug, but
seeking further than that audio would seek to 0 instead.
Note that the current --audiofile implementation using the
demux_demuxers wrapper is a fundamentally unsound design and still not
expected to generally work properly even after fixing this particular
problem.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Codec selection for audio and video decoding had a "dynamic plugin"
feature that tried to load a shared library for any codec that had not
been enabled at compilation (disabled by default, but could be enabled
with --enable-dynamic-plugins configure switch; for unknown reasons
some distro packages have enabled it). The implementation was buggy
and could cause normal codec selection fallback to fail if the feature
was enabled. I'm not aware of any real uses of such dynamic plugins
and the feature seems questionable anyway (there are no ABI guarantees
that would make it safe to use). Remove the buggy feature.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Libav stopped automatically filling missing codec_tag field for raw
codecs based on pix_fmt in libav commit bb416bd68c ("lavf: do not set
codec_tag for rawvideo"). This broke demux_lavf for raw video in
formats like YUV4MPEG, as the video format was not exported from
demux_lavf in any form (the information only existed in the pix_fmt
field of the struct AVCodecContext from libavformat, and that is not
exported). Add an explicit call to avcodec_pix_fmt_to_codec_tag() to
set the codec tag again so that selecting the correct raw decoder
based on the tag works.
|
|
|
|
|
| |
Return failure to open file in one case that could lead to an infinite
loop with broken Matroska files before.
|
|
|
|
|
|
| |
demux_mf allocated the "type" suboption of "--mf" with strdup if it
was not explicitly set. This caused a crash after playing an mf://
entry. Fix to use talloc instead.
|
|
|
|
|
|
|
|
| |
FFmpeg has increased FF_INPUT_BUFFER_PADDING_SIZE to 16 (unlike Libav
which still has it at 8). Raise MP_INPUT_BUFFER_PADDING_SIZE to 16 to
allow compilation against FFmpeg too (demuxer.c checks the padding
size for packets is at least as much as libavcodec wants for its
decoders, and this check failed with the previous value of 8).
|
|
|
|
|
|
|
|
|
| |
Commit 6e8d420a41 ("demux: avoid a copy of demux packets with lavf,
reduce padding") was missing an av_dup_packet() line. As a result at
least formats that use parsing on the lavf side could fail (with
parsing the packet may contain pointers to temporary fields that
will be overwritten/freed when reading further packets, and
av_dup_packet() is required to allocate permanent storage).
|
|
|
|
|
|
|
|
| |
After 0ece360eeaf95 ("demux_mkv: skip files faster in ordered chapter
file search") some Matroska files failed to open. The problem was that
demux_mkv_read_info() returned 0 on success, but the opening code
interpreted this as a value to stop parsing further headers. Fix this
and also modify some of the other return value handling.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pass the libavformat packet side_data field from demux_lavf to
vd_ffmpeg. Libavcodec/libavformat use this field for palette data, and
passing it is required for the playback of some paletted video codecs.
The implementation works by giving vd_ffmpeg a copy of the struct
demux_packet used to store the video packet (from which it can access
the avpacket field). The definition of struct demux_packet is moved to
new file demux_packet.h so that vd_ffmpeg.c can use it without
including all of demuxer.h.
|
|
|
|
|
|
|
|
| |
Export the codec private data field for WavPack and TrueHD audio
tracks. At least for WavPack this is necessary to make some samples
work.
Also change some other cases to use the same data-copying code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When switching audio or video tracks, demux_mkv only checked that the
new index fell in the range corresponding to tracks existing in the
file being played. However, if the demuxer can not recognize the
format of a track or detects an error, some of those tracks in the
file may not be exported from the demuxer and are not visible to the
rest of the player. Selecting such a track would cause a crash. Add
checks skip such tracks when cycling to next track and switch to
nosound instead if given an explicit track number corresponding to
such a track.
|
|
|
|
|
|
|
|
| |
demuxer.c calls demuxer->close() even if opening failed. Thus the
mkv_free() call added in 0ece360eeaf95f ("demux_mkv: skip files faster
in ordered chapter file search") was wrong, and could cause a crash
from a double free if some data structures were allocated before the
opening attempt was aborted.
|
|
|
|
|
|
| |
Drop the unnecessary include and add a missing direct include in some
files. This also revealed that demux_rtp_internal.h was missing a
config.h include, fix that too.
|
|
|
|
|
|
|
| |
Remove unnecessary demuxer.h include from aviheader.h. Through
stheader.h aviheader.h is included in a lot of files. Add missing
mp_msg.h includes to av_sub.c and sd_ass.c (previously hidden by
indirect inclusion through demuxer.h and stream.h).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When demux_lavf read a new packet it used to copy the data from
libavformat's struct AVPacket to struct demux_packet and then free the
lavf packet. Change it to instead keep the AVPacket allocated and
point demux_packet fields to the buffer in that.
Also change MP_INPUT_BUFFER_PADDING_SIZE to 8 which matches
FF_INPUT_BUFFER_PADDING SIZE; demux_lavf packets won't have more
padding now anyway (it was increased from 8 earlier when
FF_INPUT_BUFFER_PADDING_SIZE was increased in libavcodec, but that
change was reverted).
|
|
|
|
|
|
|
|
| |
Don't interpret native MPEG codec tags using our generic
format-agnostic codec tag tables. MPEG may use tag 3 for MP3, whereas
the generic tables map 3 to uncompressed PCM. Make the code ignore the
codec_tag field for the "mpeg" and "mpegts" libavformat demuxers and
rely on the codec_id value provided by lavf only.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ordered chapter code tries opening files to find those matching the
SegmentUID values specified in the timeline. Previously this scan did
a full initialization of the Matroska demuxer for each file, then
checked whether the UID value in the demuxer was a match. Make the
scan code instead provide a list of searched-for UIDs to the demuxer
open code, and make that do a comparison against the list as soon as
it sees the UID in the file, aborting if there is no match.
Also fix units used in "Merging timeline part" verbose message.
|
|
|
|
|
|
|
| |
Change written_audio_pts() and playing_audio_pts() to return
MP_NOPTS_VALUE if no reasonable pts estimate is available. Before they
returned some incorrect value typically around zero (but not
necessarily exactly that).
|
|
|
|
|
|
|
|
|
|
|
| |
Recent commit 5d5ca22a6d ("options: commandline: accept --foo=xyz
style options") left some bad code under "#ifdef MP_DEBUG" in
playtree.c, which caused a compilation failure if configured with
"--enable-debug". Fix this. Having the "#ifdef MP_DEBUG" there was
completely unnecessary; it only increased the risk for this kind of
problems for no real benefit - executing the asserts under it would
have no noticeable performance or other penalty in default builds
either. Remove several cases of such harmful "#ifdef MP_DEBUG".
|
|
|
|
|
|
| |
Rename the BSTR() function to bstr(). The former caused a conflict
with some Windows OS name, and it's no longer a macro so uppercase
naming is less appropriate.
|
|
|
|
|
|
|
| |
Do the global initialization of libavcodec and libavformat
(avcodec_register_all(), av_register_all()) immediately on program
startup and remove the initialization calls from various individual
modules that use libavcodec/libavformat functionality.
|
| |
|
|
|
|
|
|
|
|
| |
Some versions of lavf abuse codec_tag for passing Bink version
information to the decoder, which broke detection based on codec tag
(though this has already stopped again in latest Libav). Move bink
audio codec IDs from mp_wav_tags to mp_codecid_override_tags so that
codec tags are completely ignored for them.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Otherwise newer live555 versions would just hang.
Fixes http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1874
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33793 b3059339-0415-0410-9bf9-f77b7e298cf2
|
| |
| |
| |
| | |
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33762 b3059339-0415-0410-9bf9-f77b7e298cf2
|
| |
| |
| |
| |
| |
| |
| |
| | |
Setting AVIOContext for AVFMT_NOFILE formats now triggers a warning
from libavformat (and triggered an error for a while), so add a check
to avoid setting AVIOContext when not necessary.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33695 b3059339-0415-0410-9bf9-f77b7e298cf2
|
| |
| |
| |
| |
| |
| |
| | |
Fix printing of subtitle type, the wrong index was used to look up the
type.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33664 b3059339-0415-0410-9bf9-f77b7e298cf2
|
| |
| |
| |
| |
| |
| | |
Patch by Mike Castle, dalgoda+mplayer gmail
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33575 b3059339-0415-0410-9bf9-f77b7e298cf2
|