1
mirror of https://github.com/mpv-player/mpv synced 2024-10-22 08:51:57 +02:00
Commit Graph

30348 Commits

Author SHA1 Message Date
Uoti Urpala
6da77386e9 core: Fix timeline state at start of playback
A timeline starting in the middle of a source file resulted in initial
playback state not being set up properly. Fix this by forcing an
absolute seek to initialize timeline state before playback starts.
2009-12-02 13:47:48 +02:00
Uoti Urpala
4ef079f279 mplayer.c: Remove unneeded blit_frame arguments
The video updating functions no longer need to separately track
whether a frame is available for flipping. That information is
now available in video_out->frame_loaded, and all the separate
tracking did was present opportunities for things to go out of sync.
2009-12-02 13:01:36 +02:00
Uoti Urpala
7044965988 vf_vo: Use vo_seek_reset() instead of vo_control()
Change the vo_control(vo, VOCTRL_RESET, NULL) call done when the vf_vo
filter is uninited to vo_seek_reset(vo). The latter also sets
vo->frame_loaded to false.

Remove the vo->config_ok check from vo_seek_reset(). The reset call
should be doable even if config failed.
2009-12-02 12:50:56 +02:00
Uoti Urpala
de11a44bba core: Fix ordered chapter timeline building memory corruption
Two arrays were allocated one element too small, causing writes beyond
the allocated area. The bug was triggered when playing a Matroska file
with ordered chapters where each chapter came from a different source
and none of the sources was the original file.

Noticed by Daniel Dawson <ddawson@icehouse.net>
2009-12-02 12:38:13 +02:00
Uoti Urpala
74fd43cf70 demux_mkv.c: Make time arithmetic more precise in one more case
Use rounding instead of truncation in another case of double division
used with integer variables.
2009-12-02 03:55:50 +02:00
Uoti Urpala
ed333bb31d Merge svn changes up to r29971 2009-11-29 06:11:02 +02:00
Uoti Urpala
5017d713b1 vo_gl: Remove incorrect glXSwapIntervalEXT use
The list of OpenGL extension function names to try for setting the
swapinterval value contained "glXSwapIntervalEXT". Such a function
exists in the extension GL_EXT_swap_control but takes different
arguments than vo_gl expects, so trying to use it from the current
code would lead to unpredictable behavior. Remove it from the list of
functions to use.
2009-11-29 05:34:59 +02:00
Uoti Urpala
dbd1ab182e vo_vdpau.c: Fix compilation with old libvdpau versions
Misplaced #endif broke compilation with old libvdpau versions that
lack VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 #define.

Also add missing space to the text in related mp_msg() call.
2009-11-29 05:31:38 +02:00
tack
b2adf9d98d Fix mangling of 24-bit audio during channel reorder.
Only 1/3 of the samples in the buffer passed to reorder_channel_nch()
were being reordered.  For 8-, 16-, and 32-bit audio, the buffers could
be treated as int8_t, int16_t, and int32_t respectively.  24-bit audio
was being processed as int8_t, requiring iteration over n_samples*3, not
n_samples.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29971 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-28 18:23:26 +00:00
attila
ea6fe5dc40 when using -v, print also which lavc codec has been used, not
just that the init was ok


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29970 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-28 18:01:54 +00:00
jrash
d37f69a09c improve previous translation
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29969 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-27 12:23:06 +00:00
stefano
5b7ed8dad5 Make sws_format_name() use av_pix_fmt_descriptors.
This also introduces a dependency of libswscale on libavutil.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29968 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-26 21:08:45 +00:00
compn
d75ab2c3b5 add user-agent example to fix apple.com/trailers
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29967 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-26 18:01:13 +00:00
compn
cf2227159a map 0x20736D to ffac3, fixes broken mov sample
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29966 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-26 18:00:45 +00:00
compn
b3eaf99833 mime type [video/x-ms-wmv] is not an ASF redirector.
patch by KO Myung-Hun komh!chollian!net


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29965 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-26 17:57:33 +00:00
reimar
731e9490b2 Readjust the global number of subs when switching dvdnav track to take
into account any change in the number of DVD subtitles available.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29964 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-24 06:59:21 +00:00
compn
f6c6ca3422 small update wishlist
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29963 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-23 20:41:06 +00:00
Uoti Urpala
1dba61a670 build: Generate version numbers for git
Update the version.sh script for git so it'll generate version numbers
more useful than "UNKNOWN". At the moment it only generates the short
SHA1 name, but adding a tag as a starting point should allow more
useful output. Rather than update the Makefile logic that tried to
guess whether the svn revision had changed since the last version.h
update, just run the version.sh script from configure so the version
is updated at least at that time.
2009-11-23 06:22:15 +02:00
Uoti Urpala
d3a1fa98f4 core: Fix rare corner cases in video frame generation
Check that frames added by filters reach the screen and are not just
buffered by the VO, and give filters a chance to output added frames
if previous frame at EOF was buffered by VO. It's unlikely that anyone
ever noticed practical problems caused by these issues.
2009-11-23 04:38:32 +02:00
Uoti Urpala
e43926d6d1 core: Handle VO-added frames even with correct-pts disabled
At least show the extra frames even if correct-pts mode is disabled.
They cannot be timed properly though; the most practical way to fix
that is to just move to correct-pts mode instead.
2009-11-23 04:31:15 +02:00
Uoti Urpala
34c8b502e9 stream_ffmpeg: Fix reads near EOF
stream_ffmpeg used libavformat's url_read_complete() to read data.
However that function returns failure if it did not manage to read the
_full_ amount of data asked for, while the behavior we want is to
return any positive amount of data there was before end of file. This
caused attempts to read the last bytes in a file to fail. Fix by using
url_read() instead of url_read_complete(); even if some reads before
EOF return less than the full amount that should not be a problem.
2009-11-23 03:47:34 +02:00
Uoti Urpala
5995bc175a Merge svn changes up to r29962 2009-11-23 01:56:21 +02:00
reimar
af2988cbce Finally rename the STREAM_SEEK define to MP_STREAM_SEEK, there are just too many
name clashes, in particular with Windows headers (which define STREAM_SEEK as an enum type).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29962 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 15:18:21 +00:00
reimar
302527a111 Some MinGW awk versions can not handle reading from files with CRLF
line-ending, so force this file to always use just LF


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29961 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 15:10:50 +00:00
reimar
b379d40d90 100l, forgot to apply vo_w32_get_dc/vo_w32_release_dc declarations in w32_common.h
Should fix compilation on MinGW.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29960 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 14:46:43 +00:00
reimar
897f210bf4 av_alloc_format_context -> avformat_alloc_context
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29959 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 14:15:41 +00:00
reimar
b01af7a428 Fix initialization values for vf_expand priv struct.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29958 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 13:26:57 +00:00
reimar
86e0273c14 Remove unused variable.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29957 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 13:25:07 +00:00
reimar
2959f9e032 Add const to draw_slice argument to match what FFmpeg expects for draw_horiz_band.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29956 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 13:18:12 +00:00
reimar
dcd0daccca Switch ad_ffmpeg to avcodec_decode_audio3
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29955 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 13:14:39 +00:00
reimar
65c2bae2b5 Remove unused variable.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29954 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 13:08:43 +00:00
reimar
054d1889ef Reuse buffer in priv context instead of allocating the 32kB probe buffer
on the stack.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29953 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 13:06:44 +00:00
Uoti Urpala
4c552b2e42 core: Do OSD/subtitle updates at a more accurate point
OSD contents such as video position and non-libass subtitles were
updated just before feeding a video frame through filters. The updates
were done at that point mainly for the benefit of vf_expand OSD
rendering functionality, which draws the OSD contents when the frame
passes through that filter. However this gave the wrong results for
VO-drawn OSD if the filter chain or VO had any delay or timestamp
manipulation: the OSD contents should reflect the most recent contents
that were _output_ after any filtering, not the last frame that was
fed _into_ the filtering machinery. This issue became more important
after vo_vdpau started buffering frames by default.

Move the OSD updates to be done just before the OSD is drawn, using
the most accurate available information. This fixes the common case
but worsens vf_expand OSD behavior (adding extra latency). A special
case could be added to fall back to the previous behavior when
vf_expand OSD is being used; however I don't consider that a high
priority at the moment especially when other problems with vf_expand
OSD would still remain.

This has little effect on libass-rendered subtitles either way,
because both vf_ass and VO libass rendering use timestamps from the
filter chain and do not rely on separate position updates.
2009-11-22 14:15:12 +02:00
Uoti Urpala
ac8e40b4ff af_scaletempo: Fix delay value after changing scale to 1
The scaletempo filter has a special-case check to return the samples
unchanged if the current scaling factor is 1. In this case code
setting af->delay wasn't run. If the scale had had a different value
and then been changed to 1 as a result of a playback speed change then
the delay field could have a nonzero value left, resulting in A/V sync
errors. Fix by setting the delay field to 0 in the scale == 1 special
case code.
2009-11-22 12:41:04 +02:00
reimar
4d55629cd6 Fix crash with partial fribidi conversion.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29952 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 00:22:24 +00:00
reimar
75c4d3e8b5 Mention right-to-left support for embedded subtitles also in the Changelog.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29951 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 00:10:52 +00:00
reimar
03e99c5cb8 Make fribidi (i.e. right-to-left) support work with embedded subtitles.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29950 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-22 00:09:40 +00:00
jrash
4a89d76451 Synced with help_mp-en.h r29912
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29949 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-21 23:47:19 +00:00
reimar
1bd34477aa Print which visual glXChooseVisual chose when running in verbose mode.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29948 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-21 22:32:53 +00:00
reimar
c045f6525f Move OpenGL-related messages that have large output from MSGL_V to MSGL_DGB2.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29947 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-21 22:30:33 +00:00
reimar
4805ea9864 Add support for Windows OpenGL rendering onto a device instead of into a window.
Has little use except for experimenting - on Windows 9x it could be used to
render on monitors that were not managed by Windows, but that feature was
removed in newer Windows versions.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29946 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-21 22:27:40 +00:00
reimar
4198e9d45b Remove unreachable parsing code: for filters that use the option parser,
the args argument to open will always be NULL and vf->priv will always be
!= NULL.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29945 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-21 19:50:33 +00:00
reimar
597c92ff7f Support RGB48NE format in OpenGL vos (only really useful once they are modified
to actually use GLX/WGL visuals with more than 8 bits per component if available).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29944 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-21 18:59:52 +00:00
reimar
6fa77ca503 Allow vf_scale to output to RGB48, though still prefer the 24 and 32 bit formats.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29943 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-21 18:58:03 +00:00
Uoti Urpala
74b7dcc5f4 core: Add support for decoder reordering of pts values
Add a mode where libavcodec's reordered_opaque feature is used to
associate container packet timestamps with decoded frames. This should
improve behavior at least for MPEG files with interlaced h264; the
previous code does not cope well with the libavformat demuxer
producing two field packets with separate timestamps but the
libavcodec h264 decoder only producing a single output frame for those
two packets (so half the timestamps have no associated output frame).

The current libavformat mpeg demuxer seems to finally work with
interlaced h264 files and produce valid timestamps which are useful
with a mode like this.

By default MPlayer now selects between this new mode and the old one
automatically based on the number of timestamp problems they cause; by
default the new mode is used if both seem to work. The new option
-pts-association-mode can be used to force a particular mode. If
correct-pts mode is disabled this has no effect on timing.

Also remove the "EXPERIMENTAL" marker from the manpage description of
-correct-pts.
2009-11-21 20:53:10 +02:00
reimar
1f93734fd8 Support 16-bit-per-component RGB formats (rgb48[bln]e) in option parser.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29942 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-21 18:47:47 +00:00
reimar
8a6fdd634d Add a define for IMGFMT_RGB48NE that depends on machine endianness.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29941 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-21 18:45:41 +00:00
reimar
d1a2c82198 Move 128kB buffer from stack to demuxer context.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29940 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-20 23:48:16 +00:00
reimar
66c41d41c5 calloc instead of malloc+memset.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29939 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-20 23:41:06 +00:00
reimar
bd5ec5065e Use calloc to allocate a rather large (currently 32k) array instead of
putting it on the stack, performance should not matter much here.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29938 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-20 23:36:16 +00:00