summaryrefslogtreecommitdiffstats
path: root/mplayer.c
Commit message (Collapse)AuthorAgeFilesLines
* misc cosmetics: K&R style nits, #include placement, indentationdiego2010-05-291-6/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31263 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use MP_NOPTS_VALUE as "default" pts for delayed frames instead of somereimar2010-05-231-1/+1
| | | | | | | | insanely large value. Avoids hang if a decoder handles the data/size == 0 condition incorrectly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31205 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix crash if a DVD is played with dvdnav:// and without videoreimar2010-04-251-1/+2
| | | | | | | (e.g. because vo initialization failed). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31090 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename SetCodecPath() --> set_codec_path().diego2010-03-211-1/+1
| | | | | | | This keeps the naming of all path-related functions consistent. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30944 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename get_path.[ch] --> path.[ch].diego2010-03-201-1/+1
| | | | | | | These files now contain different functions related to path handling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30943 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move SetCodecPath() from loader to get_path.c and make it unconditional.diego2010-03-201-3/+0
| | | | | | | | This fixes compilation with the Win32 loader disabled but other binary codec loaders enabled. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30942 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unnecessary #ifdefs around harmless loader/codecpath.h #include.diego2010-03-181-4/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30931 b3059339-0415-0410-9bf9-f77b7e298cf2
* Split codec path related code into a separate file to fix Windows build.reimar2010-03-181-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30930 b3059339-0415-0410-9bf9-f77b7e298cf2
* Follow a more proper way to support -codecpath.komh2010-03-171-0/+4
| | | | | | | | | | 1. Include loader/drv.h for SetCodecPath() instead of a declaration of it. 2. Move codec_path from get_path.h to mpcommon.h and mpcommon.c. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30914 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add -codecpath option.komh2010-03-151-0/+5
| | | | | | | | It allows to search binary codecs in non-standard directories. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30897 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use int64_t instead of long for variable containing current playback time.reimar2010-03-071-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30857 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add required mplayer.h and access_mpcontext.h #includes.diego2010-02-221-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30707 b3059339-0415-0410-9bf9-f77b7e298cf2
* Send VOCTRL_PAUSE/VOCTRL_RESUME events also when pausing for idle mode.reimar2010-02-191-0/+5
| | | | | | | This makes the vos try to redraw the video if they can. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30660 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove some pointless '#if 1' preprocessor directives.diego2010-02-191-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30658 b3059339-0415-0410-9bf9-f77b7e298cf2
* Declare vf_menu_pause_update in libmenu/menu.h.diego2010-02-141-1/+0
| | | | | | | This avoids a forward declaration in mplayer.c. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30582 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid forward declarations for import_initial_playtree_into_gui() anddiego2010-02-141-3/+0
| | | | | | | import_playtree_playlist_into_gui; declare them in interface.h instead. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30575 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add xscreensaver_heartbeat() declaration to x11_common.h.diego2010-02-141-6/+0
| | | | | | | This avoids a forward declaration in mplayer.c. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30574 b3059339-0415-0410-9bf9-f77b7e298cf2
* Declare mp_input_register_options() in input/input.h.diego2010-02-141-2/+0
| | | | | | | This also avoids a forward declaration in mplayer.c. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30572 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename exit_reason_t enum to exit_reason and do not typedef it.diego2010-02-141-2/+4
| | | | | | | The _t namespace is reserved for POSIX; the typedef is pointless obfuscation. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30560 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move the check for valid sh_video into the init_vo_spudec, this fixes a crashreimar2010-02-131-1/+6
| | | | | | | when command.c calls this function without having to duplicate the check. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30548 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for loading ASS subtitles through the stream layer and thus e.g.reimar2010-02-051-2/+2
| | | | | | | | from some network location. Patch by Yuriy Kaminskiy [yumkam mail ru] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30515 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add license header to all top-level files missing them.diego2010-01-301-0/+17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move the resync-related code into more consistent places instead of having itreimar2010-01-241-6/+0
| | | | | | | scattered all over the place with half of it forgotten in some places. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30420 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change code to allow playing a stream even if enabling the cache failedreimar2010-01-231-2/+4
| | | | | | | while still handling it when the user aborts the cache fill. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30402 b3059339-0415-0410-9bf9-f77b7e298cf2
* At startup and while seeking avoid to introduce pointless sleeps and possiblyreimar2010-01-041-0/+12
| | | | | | | desync due to codec delay. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30218 b3059339-0415-0410-9bf9-f77b7e298cf2
* Also reset time_frame and next_frame_time on reset, it makes no sense toreimar2010-01-041-4/+5
| | | | | | | | process the sleep before playing the frame seeked to and can be annoying when the user tries to escape a series of "stuck" frames with a huge duration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30217 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fixup SDL configure check:reimar2010-01-031-0/+4
| | | | | | | | | | - Make it work without sdl-config which adds at least useless or even hurtful cflags and also does not work for cross-compiling - If using sdl-config, make it use the CFLAGS we actually use for compiling instead of something else. Thus #undef main is needed in the test program. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30178 b3059339-0415-0410-9bf9-f77b7e298cf2
* Set some freed pointers to NULL.reimar2009-12-261-0/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30118 b3059339-0415-0410-9bf9-f77b7e298cf2
* Free playtree_iter upon exiting MPlayerreimar2009-12-261-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30117 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove more direct includes of libass/ass.hreimar2009-12-241-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30105 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add braces to avoid ambiguous else.reimar2009-12-071-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29979 b3059339-0415-0410-9bf9-f77b7e298cf2
* Readjust the global number of subs when switching dvdnav track to takereimar2009-11-241-0/+1
| | | | | | | 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
* Remove useless check for valid fd with -dumpstream, the code does notreimar2009-11-171-4/+0
| | | | | | | necessarily need it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29927 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check that mpctx->audio_out is not NULL when trying to uninit it.reimar2009-11-131-1/+2
| | | | | | | | Make audio uninit consistent with e.g. the demuxer uninit code and also avoids a possible crash. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29908 b3059339-0415-0410-9bf9-f77b7e298cf2
* Added -name, -title and -use-filename-title options and implementation in ↵ptt2009-11-121-1/+5
| | | | | | X11 vos git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29904 b3059339-0415-0410-9bf9-f77b7e298cf2
* Whitespace cosmetics: fix pause_loop indentation/remove inconsistently used ↵reimar2009-11-111-37/+37
| | | | | | tabs. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29899 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not call resume on unpausing if we have already reached eof whilereimar2009-11-111-0/+3
| | | | | | | being paused (e.g. because of a "pausing_keep_force pt_step 1"). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29898 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remember which subtitle was auto-selected for dvdnav due to -slangreimar2009-11-111-1/+14
| | | | | | | | | | and if it is unchanged re-apply -slang on stream reset. This makes -slang work when used with menu navigation or in general when the subtitle is not available for parts of the playback or the subtitle stream ID changes during playback. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29897 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factor out code that decides which subtitle to play.reimar2009-11-111-24/+28
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29896 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use switch_program property from mplayer.c to set ts_prog.reimar2009-11-071-0/+4
| | | | | | | | This seems to leave the ts demuxer unaffected, but fixes -tsprog with the lavf demuxer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29846 b3059339-0415-0410-9bf9-f77b7e298cf2
* Whitespace cosmetics: reindent reinit_audio_chain functionreimar2009-11-061-43/+43
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29843 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove some useless comments/commented-out code.reimar2009-11-061-3/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29842 b3059339-0415-0410-9bf9-f77b7e298cf2
* Split assignment from error value check to avoid overcomplicated if () ↵reimar2009-11-061-2/+3
| | | | | | condition. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29841 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reuse the init_error exit path also for init_best_audio_codec errors.reimar2009-11-061-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29840 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify: use &= instead of a = b & a;reimar2009-11-061-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29839 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove some unnecessary else blocksreimar2009-11-061-3/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29838 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use an early return instead of a {} block over the whole function in ↵reimar2009-11-061-2/+2
| | | | | | reinit_audio_chain git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29837 b3059339-0415-0410-9bf9-f77b7e298cf2
* Disable audio when initializing the filter chain fails (can happen e.g. when ↵reimar2009-11-061-7/+8
| | | | | | | | | | | the hwmpa decoder is used but the hardware does not support hardware MPEG audio). Otherwise this will lead to a crash later on when the decode code tries to access the audio filter chain. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29836 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change dvdnav_reset_stream to not disable subtitles, since that breaksreimar2009-11-051-2/+0
| | | | | | | | | selecting the subtitle via -slang or -sid. It is quite possible that removing it will cause other issues, though I could not see any with the DVDs I had available for testing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29827 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make -nosub work to disable subtitles even if -slang and dvd streams are used.reimar2009-09-291-2/+0
| | | | | | | This still needs some additional checking that subtitle selection via dvdnav works. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29732 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a -nosub option that allows disabling auto-selected subtitles as e.g. thereimar2009-09-281-4/+4
| | | | | | | mkv demuxer supports. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29730 b3059339-0415-0410-9bf9-f77b7e298cf2
* Enable loading of external subtitles also for audio-only files.reimar2009-09-281-3/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29728 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use a_pos to update subtitle for audio-only files instead of ↵reimar2009-09-281-1/+1
| | | | | | | | | mpctx->sh_audio->pts which e.g. for mp3 in AVI never has a useful value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29727 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for displaying subtitles on the command-line when playingreimar2009-09-231-0/+23
| | | | | | | audio-only files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29712 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make update_subtitles work without sh_video for text subtitles.reimar2009-09-231-3/+3
| | | | | | | | | This fixes a crash with e.g. auto-enabled subtitles and -novideo due to command.c calling update_subtitles even without video and is a step toward subtitle support for audio-only files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29710 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge two Windows-specific #if sections to simplify the condition.reimar2009-09-161-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29684 b3059339-0415-0410-9bf9-f77b7e298cf2
* Hack: set DEP/NX on Windows via SetProcessDEPPolicy.reimar2009-09-161-0/+7
| | | | | | | | This should really be done via the NXCOMPAT PE flag, but looks like binutils will not get support for it any time soon and not having this security feature enabled is just ridiculous. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29683 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l, fix misplaced check in r29613, for loop detection we must comparereimar2009-09-021-1/+1
| | | | | | | | current file name against full name to be added, not current file name against new base path. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29637 b3059339-0415-0410-9bf9-f77b7e298cf2
* Limit amount of data allocated on stack, strlen(filename) is not a good idea forreimar2009-09-021-2/+6
| | | | | | | file name strings that might come from arbitrary playlists, use PATH_MAX instead. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29636 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for directory-specific mplayer.conf configuration file.reimar2009-09-021-3/+11
| | | | | | | Patch by Christian P. Schmidt "schmidt digadd de" git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29634 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make the loop detection for mov reference files less aggressive, fixesreimar2009-09-011-1/+5
| | | | | | | playback of http://stream.qtv.apple.com/qtv/wgbh/http/nova_eu/nova_eu_3012c01_mp4_ref.mov git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29613 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix per-file config file loading for DOS paths (i.e. where \ and : canreimar2009-08-311-1/+10
| | | | | | | also separate path and file name). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29604 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factor out code to try and load a config file only if it exists.reimar2009-08-311-11/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29603 b3059339-0415-0410-9bf9-f77b7e298cf2
* Only #include stream/dvbin.h when DVB is enabled.diego2009-08-031-0/+2
| | | | | | | | dvbin.h #includes some system DVB headers that may be unavailable. Fixes compilation with DVB disabled. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29474 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove pointless #ifdefs around harmless internal header #includes.diego2009-08-021-14/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29471 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make ID_SEEKABLE depend on both the stream and the demuxer being seekable,reimar2009-05-311-1/+2
| | | | | | | | | instead of only depending on the stream. This makes the value correctly 0 e.g. for AVI files without index. Patch by Jason Tackaberry [tack urandom ca] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29331 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l, demuxer info tags are _not_ case sensitive, so use strcasecmp.reimar2009-05-301-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29329 b3059339-0415-0410-9bf9-f77b7e298cf2
* whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-91/+91
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* sane verbosity levels for menu initializationdiego2009-04-251-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29231 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename RUNTIME_CPUDETECT to CONFIG_RUNTIME_CPUDETECT and always define it.ramiro2009-04-081-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29154 b3059339-0415-0410-9bf9-f77b7e298cf2
* Set the forced_subs_only value correctly whenever a new spudec is created.reimar2009-03-301-1/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29108 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make pausing_keep_force the default for the set_mouse_pos and key_down_event -