Martin Jansa [Mon, 31 Jan 2011 09:19:20 +0000 (31 10:19 +0100)]
vo_glamo: sub.h was moved to sub directory in
c9026cb3210205b07e2e068467a18ee40f9259a3
Martin Jansa [Mon, 31 Jan 2011 09:09:12 +0000 (31 10:09 +0100)]
Merge remote-tracking branch 'mplayer/master'
Conflicts:
configure
Uoti Urpala [Fri, 28 Jan 2011 18:15:22 +0000 (28 20:15 +0200)]
core: timing: fix overflow with extreme playback speed
With extreme playback speed changes it was possible to trigger an
overflow in code calculating frame timing. This could break the VDPAU
frame scheduling mechanism and lead to the shown picture not changing
until reset by events such as seeking. Add an extra check to prevent
the overflow.
Uoti Urpala [Fri, 28 Jan 2011 18:13:58 +0000 (28 20:13 +0200)]
commands: improve playback speed property/commands
Add a definition to show the playback speed property on screen, and
change the separate commands (speed_mult etc) to use the property
mechanism. Now 'set_property_osd speed' can show the value on OSD, and
the separate commands respect the range limits of the option.
Uoti Urpala [Wed, 26 Jan 2011 18:42:15 +0000 (26 20:42 +0200)]
Merge branch 'sub'
* sub:
sub/OSD: move some related files to sub/
subtitles: options: enable -ass by default
subtitles: change default libass rendering style
demux_mkv, chapters: change millisecond arithmetic to ns
cleanup: rename ass_* functions to mp_ass_*
subs: use correct font aspect ratio for libass + converted subs
cleanup: some random minor code simplification and cleanup
vf_vo: fix EOSD change detection bug
sd_ass: remove subreader use, support plaintext markup
subtitles: style support for common SubRip tags and MicroDVD
core: ordered chapters: fix bad subtitle parameter
subs/demux: don't try to enable sub track when creating it
subtitles/demux: store duration instead of endpts in demux packets
subtitles: add framework for subtitle decoders
options: add special -leak-report option
subtitles: remove code trying to handle text subs with libavcodec
cleanup: move MP_NOPTS_VALUE definition to mpcommon.h
subtitles: move global ass_track to struct osd_state
core: move most mpcommon.c contents to mplayer.c
core: move global "subdata" and "vo_sub_last" to mpctx
subtitles: remove sub_last_pts hack
options: move -noconfig to option struct, simplify
Uoti Urpala [Wed, 26 Jan 2011 17:40:52 +0000 (26 19:40 +0200)]
sub/OSD: move some related files to sub/
Uoti Urpala [Wed, 26 Jan 2011 03:50:23 +0000 (26 05:50 +0200)]
subtitles: options: enable -ass by default
There are still some problems with -ass. For example some other
subtitle options won't work the same way or at all with it enabled,
and inserting the video filter for VOs that lack native rendering
support won't work with different colorspaces. However I think that
the benefit from styling support outweights those disadvantages, and
also that the "discoverability" of features is better this way; it
will be easier for people who encounter problems to find -noass than
for people who see no styling to find out that they could add it with
-ass.
Enable -ass by default. Also fix other outdated information in the
manpage entries for -ass and -fontconfig.
Uoti Urpala [Wed, 26 Jan 2011 02:12:25 +0000 (26 04:12 +0200)]
subtitles: change default libass rendering style
Change the default style used for rendering plaintext subtitles with
libass. The following attributes change:
* FontSize: Increase the size multiplier used with the default
-subfont-autoscale 3 from 1.4 to 1.7, thus making the font 21%
larger. Actually implementing the -subfont-autoscale modes other
than 1 would give a multiplier of 5/3=1.67 for 4:3 aspect ratio
video, sqrt(337)/9=2.04 for 16:9.
* PrimaryColour: Change color from yellow to white.
* Outline: Before this was 2 regardless of user font size choice. Make
it FontSize/16 instead. With default font size this is about half
the previous width.
* Kerning: Enable kerning for the track. There won't be styling
designed for VSFilter's lack of kerning, and hopefully people won't
use broken fonts with bad kerning tables for the default font
either.
Uoti Urpala [Sun, 23 Jan 2011 22:29:01 +0000 (24 00:29 +0200)]
demux_mkv, chapters: change millisecond arithmetic to ns
demux_mkv kept various integer timestamps in millisecond units.
Matroska timestamp arithmetic is however specified in nanoseconds
(even though files typically use 1 ms precision), and using ms units
instead of that only made things more complex. Based on the demux_mkv
example the general demuxer-level chapter structure also used ms
units. Change the demux_mkv arithmetic and demuxer chapter structures
to use nanoseconds instead. This also fixes a seeking problem in
demux_mkv with files using a TimecodeScale other than the usual
1000000 (confusion between ms and TimecodeScale*ns units).
Uoti Urpala [Thu, 20 Jan 2011 16:47:18 +0000 (20 18:47 +0200)]
cleanup: rename ass_* functions to mp_ass_*
The various ass_* functions were created when libass was part of the
MPlayer tree and the distinction between MPlayer-specific and other
functions was less clear. Now that libass is a clearly separate
library, using the same ass_* namespace for player functions is ugly.
Rename the functions to use mp_ass_ prefix instead.
Uoti Urpala [Wed, 19 Jan 2011 18:13:48 +0000 (19 20:13 +0200)]
subs: use correct font aspect ratio for libass + converted subs
Rendering of ASS subtitles tries to be bug compatible with VSFilter
and stretches fonts when the video is anamorphic (some scripts try to
compensate for this VSFilter behavior, so trying to render them
"correctly" would give the wrong result). However this behavior is not
appropriate for subtitles we converted to ASS format ourselves for
libass rendering, as they certainly don't have VSFilter bug
workarounds. Change the code to use different behavior for "native"
ASS tracks and converted ones. It's questionable whether the
VSFilter-compatible behavior is appropriate for external .ass files
either, as there could be anamorphic and non-anamorphic versions of
the same video and the bug-compatible behavior can only be correct for
one alternative at most. However it's probably better to keep it as a
default at least, so that extracting a muxed subtitle track and using
that does not give behavior different from the original muxed one.
The aspect ratio setting is per ASS_Renderer, and changing it resets
libass caches. For that reason this commit adds separate renderer
instances to use for the "correct" and "VSFilter bug compatible"
cases.
Uoti Urpala [Wed, 19 Jan 2011 16:00:22 +0000 (19 18:00 +0200)]
cleanup: some random minor code simplification and cleanup
Uoti Urpala [Tue, 25 Jan 2011 01:07:27 +0000 (25 03:07 +0200)]
configure: remove obsolete things used for internal FFmpeg build
Remove some definitions from generated config.h/config.mak that were
only used when building internal FFmpeg. Remove Solaris mlib test.
Also fix definition of --disable-ffmpeg in configure help output.
Clément Bœsch [Fri, 21 Jan 2011 00:55:40 +0000 (21 01:55 +0100)]
TOOLS: Remove most of the mencoder scripts and references
Clément Bœsch [Fri, 21 Jan 2011 00:27:56 +0000 (21 01:27 +0100)]
mp_msg: Remove uses of MSGT_MENCODER
Some of the code that could run outside MEcoder used MSGT_MENCODER.
Replace those with appropriate MSGT_ types.
Clément Bœsch [Thu, 20 Jan 2011 23:45:28 +0000 (21 00:45 +0100)]
cleanup: remove unused MEncoder-related code
Remove some code and variables that were no longer used after MEncoder
removal. Also remove some MEncoder references in comments.
Clément Bœsch [Thu, 20 Jan 2011 23:45:53 +0000 (21 00:45 +0100)]
rpm: Remove MEncoder from rpm packaging
Clément Bœsch [Thu, 20 Jan 2011 23:44:26 +0000 (21 00:44 +0100)]
configure: remove MEncoder-related options and tests
Also remove one MEncoder variable reference from TOOLS/vivodump rule
in Makefile.
Uoti Urpala [Mon, 24 Jan 2011 23:06:48 +0000 (25 01:06 +0200)]
version.sh: update copyright year
Also remove an old mention of "Subversion" from comments and fix an
error in non-git-repo version string generation (which hasn't been
used for anything).
Uoti Urpala [Mon, 24 Jan 2011 14:45:51 +0000 (24 16:45 +0200)]
manpage: document -playlist being unsafe in its option description
This really should have been added to the manpage at the start of the
previous decade. There's still bad advice about -playlist in the XML
docs, but I'll remove that later when purging more obsolete/wrong
stuff from there.
Uoti Urpala [Fri, 21 Jan 2011 21:07:57 +0000 (21 23:07 +0200)]
demux_ty: fix "seek to negative position" warning
demux_ty relied on demuxer->filepos being initially set to 0, but
demuxer.c has been changed to initialize it to -1. This caused a
"Invalid seek to negative position!" error message when running the
demux_ty file format check (so it occurred for any file which had not
been recognized as another type before that). Fix by making demux_ty
initialize filepos to 0.
Uoti Urpala [Fri, 21 Jan 2011 20:52:15 +0000 (21 22:52 +0200)]
demux_lavf: reject format probe matches with low score
When trying to determine the format of an input stream, demux_lavf
retries the probe with a larger buffer size up to some limit if the
match score is low, but when reaching the size limit it accepted the
best match (if any) regardless of its score. Change it to require a
score of at least AVPROBE_SCORE_MAX/4 to accept a match at all.
Uoti Urpala [Tue, 18 Jan 2011 14:54:52 +0000 (18 16:54 +0200)]
vf_vo: fix EOSD change detection bug
vf_vo had code setting its prev_visibility variable correctly, then a
line that overrode the value just set with an incorrect one. Remove
the wrong extra line. As a result of the bug the "contents changed"
indicator wasn't forced to true when switching from a subtitle track
to "no track" and then back. A visible effect was at least that a
currently visible static subtitle disappeared when doing that switch
back and forth.
Uoti Urpala [Tue, 18 Jan 2011 13:33:36 +0000 (18 15:33 +0200)]
sd_ass: remove subreader use, support plaintext markup
Originally, when rendering plaintext subs with libass, the subtitles
were first converted to the "struct subtitle" form with sub_add_text()
and then from that to libass events. Change sd_ass to convert the
subtitles directly to libass events without using the old sub
machinery. The new conversion at least fixes some timing issues. Also
use the markup support added in the previous commit, so that
HTML-style markup is also supported in "plaintext" subs rendered with
libass.
Uoti Urpala [Tue, 18 May 2010 22:05:25 +0000 (19 01:05 +0300)]
subtitles: style support for common SubRip tags and MicroDVD
SubRip subtitles have no "official" spec for any styling support, but
various tags are in common use; previous code filtered out text
between <> to remove HTML-style tags. Add support for those tags and
for MicroDVD subtitle styling. The style display is implemented by
converting the subtitles to the ASS subtitle format and displaying
them with libass, so libass needs to be enabled.
Original patch by Clément Bœsch <ubitux@gmail.com>.
Uoti Urpala [Sun, 16 Jan 2011 19:16:47 +0000 (16 21:16 +0200)]
core: ordered chapters: fix bad subtitle parameter
mp_property_do() takes the value to set a property to through a
pointer. The calling code used '&mpctx->global_sub_pos' as the
pointer; however that variable could be changed during the
mp_property_do() call. Use a pointer to a copy of the original value
instead.
I think this only caused problems if you switched subtitle tracks from
a real one to "disabled" and then switched to a timeline part from
another source.
Uoti Urpala [Sun, 16 Jan 2011 18:59:11 +0000 (16 20:59 +0200)]
subs/demux: don't try to enable sub track when creating it
demuxer.c new_sh_sub_sid() tried to immediately select the created sub
track for playback if its id matched the "-sid" option value. This was
buggy, as more initialization is needed to properly enable subtitles.
Normally the correct track to play is selected after the demuxer has
been created. It's possible that some DVD use case or such depended on
the removed code to make -sid work with a subtitle track that's not
found at start and only added later (vobsubs probably would start
playing without separate initialization); if so then that needs to be
fixed later in a different way.
Uoti Urpala [Sun, 16 Jan 2011 18:51:48 +0000 (16 20:51 +0200)]
subtitles/demux: store duration instead of endpts in demux packets
Uoti Urpala [Sun, 16 Jan 2011 18:03:08 +0000 (16 20:03 +0200)]
subtitles: add framework for subtitle decoders
Add a framework for subtitle decoder modules that work more like
audio/video decoders do, and change libass rendering of demuxed
subtitles to use the new framework.
The old subtitle code is messy, with details specific to handling
particular subtitle types spread over high-level code. This should
make it easier to clean things up and fix some bugs/limitations.
Uoti Urpala [Mon, 17 Jan 2011 22:21:14 +0000 (18 00:21 +0200)]
cleanup: mp_msg.h: simplify mp_dbg definition
There's no need to define the mp_dbg macro differently for the
__GNUC__ and general case.
Uoti Urpala [Mon, 17 Jan 2011 14:31:45 +0000 (17 16:31 +0200)]
cleanup: mplayer.c: use VFCAP_ names instead of numeric values
Uoti Urpala [Mon, 17 Jan 2011 14:16:39 +0000 (17 16:16 +0200)]
demux: add sanity checks to packet allocation functions
Change new_demux_packet() and resize_demux_packet() length parameter
type from int to size_t and add a check to abort() if the size is over
1 GB. This should make integer overflow problems leading to memory
corruption in demuxers less likely; and aborting should be no worse
than insane memory consumption. Also make the functions abort() if the
actual allocation fails instead of trying to continue with a
zero-sized buffer.
Uoti Urpala [Mon, 17 Jan 2011 13:47:57 +0000 (17 15:47 +0200)]
cleanup: move demux packet functions from demuxer.h to demuxer.c
There's no reason why the demux packet functions would need to be
inlined, so move them from the header to the .c file.
Uoti Urpala [Sat, 15 Jan 2011 20:26:27 +0000 (15 22:26 +0200)]
options: add special -leak-report option
Add a special option "-leak-report" that enables talloc leak
reporting. It only works if it's given as the first argument.
The code abuses the CONF_TYPE_PRINT option type to make main option
parsing ignore the option. The parser incorrectly consumed the
following commandline argument as a "parameter" for options of this
type when they had the flag to not exit after printing the message.
Fix this. It makes no difference for any previously existing option I
think.
Uoti Urpala [Fri, 14 Jan 2011 12:05:22 +0000 (14 14:05 +0200)]
subtitles: remove code trying to handle text subs with libavcodec
The avsub implementation tries to fall back to MPlayer's other text
subtitle decoding if libavcodec returns text as the 'decoded'
subtitle. The code implementing this is buggy, and as far as I can see
it should not be triggered normally (libavcodec decoding is only
used for xvid, pgs and dvb subtitles, and for those libavcodec should
return bitmaps). Remove the buggy code (don't try to support
non-bitmap results) and simplify things a bit.
Uoti Urpala [Wed, 12 Jan 2011 13:29:31 +0000 (12 15:29 +0200)]
cleanup: move MP_NOPTS_VALUE definition to mpcommon.h
Uoti Urpala [Wed, 12 Jan 2011 13:15:02 +0000 (12 15:15 +0200)]
subtitles: move global ass_track to struct osd_state
Uoti Urpala [Tue, 11 Jan 2011 23:37:02 +0000 (12 01:37 +0200)]
core: move most mpcommon.c contents to mplayer.c
The contents of mpcommon.c were quite arbitrary; the most common
reason to place some functions in this file had been "MEncoder happens
to need similar code as MPlayer and we want to share some parts, but
we have no clue whatsoever how to organize things in a sensible way,
so we'll just dump those parts we want to share in mpcommon.c". As a
result of containing an essentially random subset of top-level player
functionality the mpcommon.h header required access to central structs
and was unsuitable for inclusion in lower-level code, but was
nonetheless included there for the mplayer_version symbol.
Move almost all contents from mpcommon.c to mplayer.c. mplayer.c is
already big and should perhaps be split further, but keeping a few
random functions in mpcommon.c would not be an improvement.
Uoti Urpala [Tue, 11 Jan 2011 15:48:45 +0000 (11 17:48 +0200)]
core: move global "subdata" and "vo_sub_last" to mpctx
Uoti Urpala [Tue, 11 Jan 2011 15:35:28 +0000 (11 17:35 +0200)]
subtitles: remove sub_last_pts hack
This code was probably added because of bad pts handling in old timing
code, and should not be needed any more.
Uoti Urpala [Tue, 11 Jan 2011 15:28:10 +0000 (11 17:28 +0200)]
options: move -noconfig to option struct, simplify
Clément Bœsch [Sun, 9 Jan 2011 14:59:04 +0000 (9 15:59 +0100)]
manpage: Remove forgotten "MPlayer only" notes
Clément Bœsch [Wed, 5 Jan 2011 18:46:21 +0000 (5 19:46 +0100)]
manpage: Remove "MPlayer only" notes
Uoti Urpala [Tue, 4 Jan 2011 21:51:31 +0000 (4 23:51 +0200)]
vo_vdpau: allow "deint=-N" to specify mode without enabling deint
Allow negative values of the "deint" parameter and make them select
the same deinterlacing mode as the corresponding positive value, but
without enabling deinterlace on startup. This is useful for
configuration files. Also tweak the overall manpage description of
vo_vdpau a bit to make it sound less as if the VO would be for
hardware acceleration only.
Uoti Urpala [Sat, 1 Jan 2011 03:37:28 +0000 (1 05:37 +0200)]
core: add timing workaround for PulseAudio misbehavior
PulseAudio could keep reporting high delay values after a reset of
playing audio. This broke playback after seeking in some cases. Add a
workaround that should make things more robust against such
misbehavior.
Clément Bœsch [Sat, 25 Dec 2010 12:47:30 +0000 (25 13:47 +0100)]
manpage: Remove MEncoder references
Uoti Urpala [Mon, 20 Dec 2010 17:38:54 +0000 (20 19:38 +0200)]
core: fix audio-only + framestep weird behavior
Trying to do a framestep while playing an audio-only file would play
the file until the end, then start the next file in paused state. Make
framestep state enter pause again immediately if there is no video.
Also reset framestep state when switching files.
Uoti Urpala [Mon, 20 Dec 2010 17:17:43 +0000 (20 19:17 +0200)]
Merge branch 'hr-seek'
* hr-seek:
input: add default keybindings Shift+[arrow] for small exact seeks
input: support bindings with modifier keys for X input
core: audio: make ogg missing audio timing workaround more complex
core: add support for precise non-keyframe-limited seeks
core: add struct for queued seek info
commands: add generic option -> property wrapper
options: add "choice" option type, use for -pts-association-mode
core: remove looping in update_video(), modify command handling a bit
core: seek: use accurate seek mode with audio-only files
core: avoid using sh_video->pts as "current pts"
libvo: register X11 connection fd in input event system
core: timing: add special handling of long frame intervals
core: move central play loop to a separate function
Conflicts:
DOCS/tech/slave.txt
Uoti Urpala [Sun, 19 Dec 2010 11:34:06 +0000 (19 13:34 +0200)]
input: add default keybindings Shift+[arrow] for small exact seeks
Uoti Urpala [Sun, 19 Dec 2010 10:12:20 +0000 (19 12:12 +0200)]
input: support bindings with modifier keys for X input
Add support for binding commands to modifier+key combinations like
"Shift+Left" or "Ctrl+Alt+x", and support reading such combinations
from the output window of X VOs.
The recognized modifier names are Shift, Ctrl, Alt and Meta. Any
combination of those and then a non-modifier key name, separated by
'+', is accepted as a key name in input.conf. For non-special keys
that produce characters shift is ignored as a modifier. For example
"A" is handled as a key without modifiers even if you use shift to
write the capital letter; 'a' vs 'A' already distinguishes the
combinations with a normal keymap, and having separate 'a', 'Shift+A'
and 'A' (written with caps lock for example) would bring more
confusion than benefit.
Currently reading the modifier+key combinations is only supported in
the output window of those VOs that use x11_common.c event
handling. It's not possible to input the key combinations in other VOs
or in a terminal window.
Uoti Urpala [Thu, 16 Dec 2010 19:26:12 +0000 (16 21:26 +0200)]
core: audio: make ogg missing audio timing workaround more complex
After the addition of exact seeking the code to work around missing
audio timestamps with ogg/ogm needs improvement. Now it's normal to
need adjustment at stream start time 0 (seeking to a position after
start of video but before second keyframe) with any video format, and
for exact seeks with ogg it's now more important not to skip the
sync. Make the check to detect the problem case more precise to avoid
affecting most other formats, and try to decode a second of audio
(hoping to get timestamps for those packets) before giving up.
Uoti Urpala [Tue, 14 Dec 2010 23:09:47 +0000 (15 01:09 +0200)]
core: add support for precise non-keyframe-limited seeks
Add support for seeking to an arbitrary non-keyframe position by
decoding video starting from the previous keyframe. Whether to use
this functionality when seeking is controlled by the new option
-hr-seek and a new third argument to the "seek" command. The default
is to use it for absolute seeks (like chapter seeks) but not for
relative ones. Because there's currently no support for cutting
encoded audio some desync is expected if encoded audio passthrough is
used. Currently precise seeks always go to the first frame with
timestamp equal to or greater than the target position; there's no
support for "matching or earlier" backwards seeks at frame level.
Uoti Urpala [Sat, 18 Dec 2010 08:13:45 +0000 (18 10:13 +0200)]
core: add struct for queued seek info
To prepare for the addition of exact seek support, add a struct for
queued seek state and a helper function to update its state. It would
have been cumbersome to update additional state (showing whether the
seek is forced to be exact or non-exact) manually at every point that
handles seeks.
Uoti Urpala [Mon, 20 Dec 2010 04:42:04 +0000 (20 06:42 +0200)]
cosmetics: remove unused code, small formatting tweaks
Uoti Urpala [Mon, 20 Dec 2010 04:34:11 +0000 (20 06:34 +0200)]
commands: clean up get_metadata() and related code
Code in get_metadata() allocated too small a buffer for the text it
wrote (noticed by Clément Bœsch). Make the code cleaner and more
robust by changing it to use talloc_asprintf(). Also make it always
return non-NULL and remove checks on caller side.
Uoti Urpala [Mon, 20 Dec 2010 03:53:28 +0000 (20 05:53 +0200)]
vd_ffmpeg: set thread count to number of cores on machine by default
Make "-lavdopts threads=0" mean an autodetected number of threads, and
make that the default value of the option. Also increase the upper
limit of the option from 8 to 16. Add new file osdep/numcores.c which
tries to determine the number of cores available on the machine.
numcores.c is based (heavily modified) on public domain numcpus.c by
Philip Willoughby <pgw99@doc.ic.ac.uk>, downloaded from
http://csgsoft.doc.ic.ac.uk/numcpus/
Uoti Urpala [Mon, 20 Dec 2010 01:14:43 +0000 (20 03:14 +0200)]
demux_mkv: remove old code for -nocorrect-pts support
There should be no reason for anyone to use demux_mkv in
-nocorrect-pts mode any more, so delete the code used for that.
Uoti Urpala [Mon, 20 Dec 2010 00:26:10 +0000 (20 02:26 +0200)]
demux_mkv: fix seeks to before the first index entry
Make seeks backward from a time before the first index entry go to the
first entry instead of failing completely. This change doesn't affect
behavior for most files, because seeks are clamped to 0 from below and
normally files have the first index entry at 0.
Uoti Urpala [Sat, 18 Dec 2010 10:38:45 +0000 (18 12:38 +0200)]
DOCS/tech/slave.txt: update some obsolete information
Update obsolete information based on old pause behavior. Remove
mention of old GUI-specific commands.
Uoti Urpala [Sat, 18 Dec 2010 06:02:48 +0000 (18 08:02 +0200)]
commands: add generic option -> property wrapper
Add mp_property_generic_option(), a property function that can be used
for generic option-based properties that do not require any action
beyond manipulating the value of the option variable. Currently it
directly implements GET and SET, plus STEP_UP for "choice" options
only. Use it to add a property for -pts-association-mode (not
particularly useful in normal use, but serves as a test).
Uoti Urpala [Fri, 17 Dec 2010 23:00:28 +0000 (18 01:00 +0200)]
options: add "choice" option type, use for -pts-association-mode
Add a "choice" option type. Options of this type take a string as
input and set an int option variable to the value corresponding to the
string. The string->int mapping is option-specific and is given in the
option definition. Strings not found in the mapping are rejected as
invalid option values.
Change the option -pts-association-mode to use this new option type
and accept values "auto, decoder, sort" instead of "0, 1, 2". The
change in accepted values shouldn't cause problems as this option is
not appropriate to use in normal user config files.
Uoti Urpala [Tue, 14 Dec 2010 23:02:14 +0000 (15 01:02 +0200)]
core: remove looping in update_video(), modify command handling a bit
Let higher-level code call update_video() again instead of looping
inside it until there's a frame ready to show. Change the conditions
for running user commands somewhat. Overall effect shouldn't be that
big. Now other commands can be executed after a seek before a video
frame is decoded; in this case the seek target time may be used as the
"current position".
reimar [Sun, 12 Dec 2010 20:59:18 +0000 (12 20:59 +0000)]
demux_asf: Add a missing free to ASF demuxer close
Fixes bug #1238.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32711 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sun, 12 Dec 2010 19:25:43 +0000 (12 19:25 +0000)]
playtreeparser.c: Add playlist parser for .nsc files
Tested to properly decode .nsc files, but not properly tested since
no publically available stream could be found.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32710 b3059339-0415-0410-9bf9-f77b7e298cf2
Remove pointless NULL checks before free.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32715 b3059339-0415-0410-9bf9-f77b7e298cf2
compn [Sun, 12 Dec 2010 17:16:59 +0000 (12 17:16 +0000)]
example.conf: add some profile information and user-agent examples
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32709 b3059339-0415-0410-9bf9-f77b7e298cf2
add realplayer user-agent
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32712 b3059339-0415-0410-9bf9-f77b7e298cf2
add winamp useragent example
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32713 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sun, 12 Dec 2010 16:50:13 +0000 (12 16:50 +0000)]
demux_mov: fix possible hang on invalid input
len < 8 is also invalid for 64-bit codec chunk size.
Previous code could cause hang.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32708 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sun, 12 Dec 2010 14:31:17 +0000 (12 14:31 +0000)]
aviheader.c: avoid using uninitialized data in an error case
Avoid using uninitialized data if index read does not return enough data.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32707 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sun, 12 Dec 2010 13:56:35 +0000 (12 13:56 +0000)]
ad_faad: fix crash when used on an empty audio stream
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32706 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sun, 12 Dec 2010 12:36:56 +0000 (12 12:36 +0000)]
ad_speex: improve timestamp handling
Improve speex codec pts handling, make audio timestamps work reasonably
even with the native demuxer as long as seeking is not done.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32704 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sun, 12 Dec 2010 12:13:01 +0000 (12 12:13 +0000)]
demux_mov: fix some memory allocation handling
Always free before overwriting a pointer with a newly allocated one,
always use calloc instead of realloc when the previous data is not
needed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32703 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sun, 12 Dec 2010 11:45:47 +0000 (12 11:45 +0000)]
stream.h: check against huge negative values in stream_seek()
Add validity check for stream_seek argument to avoid a integer
overflow for huge negative values that would break the internal state
of the stream buffer.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32702 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sun, 12 Dec 2010 10:37:15 +0000 (12 10:37 +0000)]
demux_gif: Fix memleaks on error
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32701 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sun, 12 Dec 2010 10:23:41 +0000 (12 10:23 +0000)]
vd_ffmpeg: fix MP_IMGTYPE selection for non-ref non-B frames
Change direct rendering buffer allocation code to treat non-ref frames
like B-frames even if has_b_frames is not set and they are indeed not
B-frames (no reordering). Treating it as an I/P frame would violate
the assumptions of MPlayer's buffering system, which thinks only the
latest previous I/P frame is needed (in addition to one possibly being
decoded). In this case the previous I/P frame will still be needed in
the future, not the non-ref frame being decoded now.
This happens with flv files, as in bug #1079, and this change fixes that
corruption.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32700 b3059339-0415-0410-9bf9-f77b7e298cf2
compn [Sun, 12 Dec 2010 01:32:21 +0000 (12 01:32 +0000)]
manpage: correct -tv audiorate description, change bitrate to samplerate
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32699 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 11 Dec 2010 23:19:13 +0000 (11 23:19 +0000)]
demux_ts: change overlapping memcpy to memmove
Replace memcpy with memmove since at least src==dst is possible.
Fixes another issue that is part of bug #1280.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32697 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 11 Dec 2010 23:15:48 +0000 (11 23:15 +0000)]
demux_ts: fix several memleaks
Fixes bug 1280.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32696 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 11 Dec 2010 22:22:54 +0000 (11 22:22 +0000)]
demux_ts: cleanup
Replace malloc+memset with calloc and use sizeof(*variable).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32694 b3059339-0415-0410-9bf9-f77b7e298cf2
Replace hard-coded number for loop limits for array index by
the define used in the array declaration.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32695 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 11 Dec 2010 22:19:46 +0000 (11 22:19 +0000)]
demux_ts: avoid using unitialized data
Add memset to avoid using uninitialized data with sample in bug 1280.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32693 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 11 Dec 2010 21:11:33 +0000 (11 21:11 +0000)]
mp3_hdr.h: fix mp_check_mp3_header()
Fix mp_check_mp3_header: it checked for a byte-swapped MP3-header
on little-endian, and on big-endian it would only accept a MP3-header
that would be valid when read in both directions.
The latter was the reason for bug 905, causing the PS demuxer to
claim files far too agressively (the MP3 check avoiding misdetection
as DV is not exactly a sane approach, but it mostly works).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32692 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 11 Dec 2010 19:32:23 +0000 (11 19:32 +0000)]
demux_demuxers: Fix crash with -audiofile and audio disabled
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32691 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 11 Dec 2010 18:37:00 +0000 (11 18:37 +0000)]
vd_ffmpeg: Reset ctx->vo_initialized to 0 on a resolution change
Otherwise we might think the filter chain/vo is ready when it
actually is not, leading to a crash.
Fixes crash part of bug 1156.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32690 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 11 Dec 2010 17:45:41 +0000 (11 17:45 +0000)]
ad_speex: Fix possible memory leaks on error
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32689 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 11 Dec 2010 15:43:24 +0000 (11 15:43 +0000)]
demux_asf, asfheader.c: cleanup
Move setup of sh_audio->format to a more appropriate place (in asfheader.c).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32684 b3059339-0415-0410-9bf9-f77b7e298cf2
Remove pointless assignments that are already handled in new_sh_audio.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32685 b3059339-0415-0410-9bf9-f77b7e298cf2
Remove useless assignment already done in new_sh_video.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32686 b3059339-0415-0410-9bf9-f77b7e298cf2
Use FFMAX for slightly better readability.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32687 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 11 Dec 2010 15:30:28 +0000 (11 15:30 +0000)]
demux_real: fix some unaligned writes
Fix some unaligned writes and avoid some (incorrect due to alignment) casts.
Might also fix bug #371.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32683 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 11 Dec 2010 12:44:39 +0000 (11 12:44 +0000)]
commands: Allow cycling subtitles backwards with 'J'
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32680 b3059339-0415-0410-9bf9-f77b7e298cf2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32714 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Wed, 8 Dec 2010 22:53:52 +0000 (8 22:53 +0000)]
demux_audio: Do not generate nonsensical pts values for FLAC
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32678 b3059339-0415-0410-9bf9-f77b7e298cf2
cboesch [Sat, 4 Dec 2010 10:24:42 +0000 (4 10:24 +0000)]
Change some filename-handling code to use mp_basename()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32675 b3059339-0415-0410-9bf9-f77b7e298cf2
jrash [Sat, 4 Dec 2010 01:55:18 +0000 (4 01:55 +0000)]
DOCS/man/zh_CN: sync with en/mplayer.1 rev. 32661
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32674 b3059339-0415-0410-9bf9-f77b7e298cf2
cboesch [Fri, 3 Dec 2010 23:10:36 +0000 (3 23:10 +0000)]
stream/http: Add support for login/password in http_proxy env variable
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32673 b3059339-0415-0410-9bf9-f77b7e298cf2
cboesch [Fri, 3 Dec 2010 19:52:10 +0000 (3 19:52 +0000)]
stream/: delete base64_encode(), use libavutil av_base64_encode()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32672 b3059339-0415-0410-9bf9-f77b7e298cf2
compn [Mon, 29 Nov 2010 23:26:46 +0000 (29 23:26 +0000)]
DOCS/xml: change --with-extraincdir to --extra-cflags
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32669 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Mon, 29 Nov 2010 18:56:21 +0000 (29 18:56 +0000)]
demux_audio: Set needs_parsing to 1 for DTS audio
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32668 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sun, 28 Nov 2010 18:02:50 +0000 (28 18:02 +0000)]
demux-ts: fix TS files with MP4 ES AAC descriptor
Fix TS files with MP4 ES AAC descriptor to be correctly recognized
as AAC and not AAC in LATM.
This fixes playback of http://samples.mplayerhq.hu/A-codecs/AAC/freetv_aac_latm.ts,
actual LATM samples seem unaffected.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32667 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sun, 28 Nov 2010 07:47:37 +0000 (28 07:47 +0000)]
vidix: radeon and big-endian fixes
Add R_OVL_SHIFT to all R280 devices. Only actually confirmed for two.
Fixes bug #1826.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32663 b3059339-0415-0410-9bf9-f77b7e298cf2
Restore big-endian support removed in thoughtless upstream merge
at r23062.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32664 b3059339-0415-0410-9bf9-f77b7e298cf2
100l, fix vidix compilation on big-endian
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32665 b3059339-0415-0410-9bf9-f77b7e298cf2
Add horrible hack to make xvidix work on big-endian.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32666 b3059339-0415-0410-9bf9-f77b7e298cf2
compn [Sun, 28 Nov 2010 05:32:00 +0000 (28 05:32 +0000)]
codecs.conf: add ffmpeg g722 audio codec
works on incoming/g722/ sample
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32662 b3059339-0415-0410-9bf9-f77b7e298cf2
compn [Sat, 27 Nov 2010 18:06:45 +0000 (27 18:06 +0000)]
mp_taglists.c: add tag for svq3
Fixes:
ffmpeg://rtsp://stream.diffusion.ens.fr/2008_10_03_albarede.mov
and other X-SV3V-ES rtsp streams opened with ffmpeg://
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32660 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 27 Nov 2010 13:54:23 +0000 (27 13:54 +0000)]
demux_lavf: Add support for uncompressed BGR24 pixfmt
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32659 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 27 Nov 2010 12:23:20 +0000 (27 12:23 +0000)]
vd_qtvideo: Do not dump image description by default
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32656 b3059339-0415-0410-9bf9-f77b7e298cf2
Reindent.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32657 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 27 Nov 2010 10:07:19 +0000 (27 10:07 +0000)]
cosmetics: make some arguments const, "unsigned char"->uint8_t
Mark input-only buffers as const.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32652 b3059339-0415-0410-9bf9-f77b7e298cf2
Use uint8_t type instead of unsigned char.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32653 b3059339-0415-0410-9bf9-f77b7e298cf2
Mark input buffer that is never modified as const.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32654 b3059339-0415-0410-9bf9-f77b7e298cf2
Mark input-only buffer as const.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32655 b3059339-0415-0410-9bf9-f77b7e298cf2
reimar [Sat, 27 Nov 2010 10:01:11 +0000 (27 10:01 +0000)]
av_sub: Support clearing subtitles
Makes PGS subtitles disappear at the appropriate time.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32651 b3059339-0415-0410-9bf9-f77b7e298cf2