summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mplayer: make OSD stack a member of MPContextwm42012-08-044-54/+54
| | | | | | | | | This also requires that the OSD stack related functions carry a pointer to MPContext. Free the OSD stack items (mp_osd_msg) at exit by making MPContext the talloc parent. (E.g. when exiting while something is still displayed on the OSD.)
* mplayer: free return value of chapter_name()wm42012-08-041-5/+8
|
* mplayer: never exit mplayer from within the play loopwm42012-08-045-25/+34
| | | | | | | | | | | | | | | | | The only place exit_player() should be called is the main() function. exit_player() should be the only function allowed to call exit(). This makes it easier to guarantee proper deinitialization, and allows using the --leak-report flag without showing false positives. The quit slave command now sets a flag only. It uses the same mechanism that's normally used to advance to the next file on the playlist, so the rest of the playback path should be able to react to the quit command quickly enough. That is, the player should react just as fast to quit requests in practice as before this commit. In reinit_audio_chain(), the player was actually exited if init_audio_filters() failed. Reuse the normal error handling path to handle this condition.
* command, mplayer: free return value of demuxer_stream_lang()wm42012-08-042-0/+2
|
* mplayer: fix invalid memory access in print_stream()wm42012-08-041-1/+1
| | | | This is a regression introduced by commit 9c02ae7e95108.
* playlist: rename params_count field to num_params for consistencywm42012-08-043-5/+5
| | | | | Other (newer) parts of mplayer use this convention, so don't introduce new conventions.
* mplayer: rearrange misleading codewm42012-08-041-3/+4
| | | | | | | The print_timeline() function actually had contained some code that changed the MPContext state. Since you wouldn't expect that from a function named print, move that code out of the function. The misleading code structure was introduced in commit 6f564fe82b.
* mplayer: fix idle mode regressionswm42012-08-043-42/+78
| | | | | | | | | | | | | | | | | | | | | Commit 89a17bcda6c16 simplified the idle loop to run any commands mplayer receives, not just playlist related commands. Unfortunately, it turns out many slave commands always assume the presence of a demuxer. MPContext->demuxer is assumed not to be NULL. This made the player crash when receiving slave commands like pause/unpause, chapter control, subtitle selection. We want mplayer being able to handle this. Any slave command or property, as long as it's backed by a persistent setting, should be run successfully, even if no file is being played. If the slave command doesn't make sense in this state, it shouldn't crash the player. Insert some NULL checks when accessing demuxers. If sh_video or sh_audio are not NULL, assume demuxer can't be NULL. (There actually aren't that many properties which need to be changed. If it gets too complicated, we could employ alternative mechanisms instead, such as explicitly marking safe properties with a flag.)
* options: fix forgotten --sound => --audio renamewm42012-08-031-1/+1
|
* demuxer: introduce a general stream structwm42012-08-037-169/+176
| | | | | | | | | | | | | | | | There are different C types for each stream type: sh_video for video, sh_audio for audio, sh_sub for sub. There is no type that handles all stream types in a generic way. Instead, there's a macro SH_COMMON, that is used to define common fields for all 3 stream structs. Accessing the common fields is hard if you want to be independent from the stream type. Introduce an actual generic stream struct (struct sh_stream), which is supposed to unify all 3 stream types one day. Once all fields defined by SH_COMMON have been moved into sh_stream, the transition is complete. Move some fields into sh_stream, and rewrite osd_show_tracks to use them.
* command: make audio switching persistent across file switcheswm42012-08-031-0/+1
| | | | | | | | | | | mp_property_audio switched the audio stream, but didn't store the newly requested audio ID to MPOpts.audio_id, which is used by --aid. This meant that the audio track would be reset when advancing to a new file. Change that to make it consistent with subtitle selection. (Whether this behavior is a good idea or not is a different question - maybe it's not a good idea, because tracks are essentially random, and this will disable default selection of tracks.)
* mplayer: fix output of audio/sub language in terminal outputwm42012-08-032-7/+14
| | | | | | | The SH_COMMON lang field seems to be blatantly unreliable and is not always set by demux_lavf (at least not with dvdnav:// ). Also fix the same for the show_tracks_osd slave command.
* mplayer: move file loading out of main()wm42012-08-031-253/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The structure is now as follows: - main(): * basic initializations (e.g. init_libav() and more) * pre-parse command line (verbosity level, config file locations) * load config files (parse_cfgfiles()) * parse command line, add files from the command line to playlist (m_config_parse_mp_command_line()) * call: - handle_help_options(): * check each help-related option * print help if requested * main() exits if help was requested * call function that works down the playlist: - play_files(): * run idle loop (idle_loop()), until there are files in the playlist or an exit command was given (slave mode only) * actually load and play a file: - play_current_file(): * run all the dozens of functions to load the file and initialize playback * run a small loop that does normal playback, until the file is done or a slave command terminates playback (each iteration, run_playloop() is called) * uninitialize playback * determine next entry on the playlist to play * loop * call exit_player_with_rc() (there are many other places which use this function, though)
* mplayer: move things out of main()wm42012-08-031-213/+240
| | | | | | | The main() function used to be way too big, to the point that it was unreadable (> 1000 lines). Move random parts out of the main into new functions.
* sub: simplify code by always defining sub_cpwm42012-08-034-11/+3
|
* x11_common: remove some code duplicationwm42012-08-031-114/+54
| | | | This sin was committed in 2002.
* mplayer: do not create X11 state in player frontendwm42012-08-037-23/+24
| | | | | | | | | | | | | This is about the vo_x11_init_state() call. It basically opens a X11 connection. It's called in the main() function once. It's not really clear why this isn't done on VO creation instead. Maybe one reason was that --no-fixed-vo used to be the default: when playing a new file, the full VO state would be free'd and recreated. Keeping the X11 connection possibly improved things, although the question is how. In summary, there is no good reason to do this, and it only adds platform specific details to the player frontend. Do the X11 initialization in the respective VOs instead.
* mplayer: move highly OS specific initialization code out of main()wm42012-08-031-44/+47
| | | | | | | | The intention is to make the main() function smaller (which is at about 1000 lines currently). This commit also changes the order of some initializations, but that should be safe.
* mplayer, stream_tv: move variable initializationwm42012-08-032-5/+1
| | | | It's not clear why that was done in mplayer's main function.
* demux_audio: always enable parsing for audio streamsmplayer-svn2012-08-031-1/+2
| | | | | | | | | Generally enable parsing for audio streams. The formats I know of that do not need it (e.g. raw audio) do not have a parser anyway. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35050 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* subassconvert: order colour names alphabetically / better match W3 listmplayer-svn2012-08-031-7/+23
| | | | | | | | | | | | | | | | Order colour names alphabetically / better match W3 list. Patch by Federico Kereki, fkereki gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35006 b3059339-0415-0410-9bf9-f77b7e298cf2 Add a few new CSS colors. Patch by Federico Kereki, fkereki gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35007 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: cehoyos
* tv: reduce code duplicationmplayer-svn2012-08-031-21/+14
| | | | | | | Reduce some code duplication. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34995 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* vf_unsharp: direct rendering fixesmplayer-svn2012-08-031-5/+5
| | | | | | | | | | | | | | | | | | unsharp: actually process the frame we got. Previously it would always process the last frame allocated, but that might be a different one than the one first returned. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34975 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar Request a sufficiently large image for direct rendering. Fixes broken video near the borders. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34979 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: ib
* vf_ass: use correct height when copying imagewm42012-08-031-1/+1
| | | | | | | The target image can be larger than the image size the video filter was configured for. Based on mplayer-svn commit 34973.
* vf_ass: request a sufficiently large image for direct renderingmplayer-svn2012-08-031-1/+3
| | | | | | | | | | | | Request a sufficiently large image for direct rendering. Due to alignment and similar, we might need a buffer larger than the output of the ASS filter. Fixes out of bound writes and/or broken video near the borders. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34970 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* bstr.h: fix compilation with C++wm42012-08-031-3/+3
|
* configure: fix directx check on Cygwinmplayer-svn2012-08-031-0/+1
| | | | | | | | | | | | | build: Fix vo directx configure check on Cygwin Without windows.h included syntax errors will arise inside (some versions of) the ddraw.h header. The wine-based ddraw.h header was reported to not have this problems. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34953 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: al
* mp3_hdr: cleanupsmplayer-svn2012-08-031-59/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return a spf value even when srate is NULL. Based on patch by Benoît Thébaudeau [benoit thebaudeau advansee com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34916 b3059339-0415-0410-9bf9-f77b7e298cf2 Make some tables const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34917 b3059339-0415-0410-9bf9-f77b7e298cf2 Use more appropriate types. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34918 b3059339-0415-0410-9bf9-f77b7e298cf2 Some minor simplifications. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34919 b3059339-0415-0410-9bf9-f77b7e298cf2 Cosmetics: fix up indentations, get rid of a few lost tabs. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34920 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove unused code from mp_get_mp3_header. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34923 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_audio: fix calculation of audio lengthmplayer-svn2012-08-031-1/+2
| | | | | | | | | Take start offset into account when calculating amount of audio data. Patch by Benoît Thébaudeau [benoit thebaudeau advansee com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34915 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_audio: avoid integer overflowsmplayer-svn2012-08-031-3/+7
| | | | | | | | | Add some additional checks to ensure subtractions do not overflow. Patch by Benoît Thébaudeau [benoit thebaudeau advansee com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34914 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* stream_pvr: fix buffer overflowmplayer-svn2012-08-031-16/+13
| | | | | | | | | stream_pvr: Use sizeof() to get destination buffer size. The code in lines 382/384 used the wrong constant. Fixes bug #2066. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34895 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* configure: try linking in libmad testmplayer-svn2012-08-031-1/+1
| | | | | | | Try linking when testing for libmad. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34880 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: cehoyos
* reorder_ch: support reordering 8 channels to AAC layoutmplayer-svn2012-08-031-0/+19
| | | | | | | | | | | | | | | | This will allow us to encode 7.1 audio AAC. 7.1 audio not being really popular, instead of creating a new re_order function, I'm using 2 functions for the re_ordering from L R Ls Rs C LFE Rls Rrs --> C L R Ls Rs Rls Rrs LFE Patch by Thierry Foucu [tfoucu gmail] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34877 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: ranma http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2012-April/070252.html
* spudec: use more precise alpha handling for -spuaa 4mplayer-svn2012-08-031-2/+2
| | | | | | | Use more precise alpha handling for -spuaa 4. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34874 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* stream: detect prematurely closed connectionmplayer-svn2012-08-031-1/+2
| | | | | | | | | | | | | Detect prematurely closed connection. Then we get a streaming_stopped status but we have a end_pos and have not reached it yet, do not accept it as EOF but instead try reconnection. For example a forced restart of a webserver will usually result in the connection being closed before EOF. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34873 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* av_sub, spudec: support multiple rectanglesmplayer-svn2012-08-033-41/+113
| | | | | | | | | | av_sub: support multiple rectangles. The "packet_t" structure is renamed with a prefix, because it is used a public header. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34872 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: cigaes
* stream: retry reconnecting several timesmplayer-svn2012-08-031-8/+22
| | | | | | | | | | | | | Retry reconnecting several times. Also add a delay, otherwise a server closing any incoming connection immediately would make MPlayer stop even if it happens only for 1 second or so. With this change, no server/network outage of any kind shorter than 5 seconds should cause MPlayer to give up anymore. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34871 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* vo_yuv4mpeg: support writing to stdoutmplayer-svn2012-08-031-3/+5
| | | | | | | | | | | | | | | | | | | | yuv4mpeg: support writing to stdout instead of file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34861 b3059339-0415-0410-9bf9-f77b7e298cf2 Allow using -vo yuv4mpeg for files with resolution changes. Not all programs can read such files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34862 b3059339-0415-0410-9bf9-f77b7e298cf2 vo_yuv4mpeg: flush userspace FILE buffers after each frame. Potentially reduces delay when piping to stdout/fifo. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34879 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_real: set aspect ratiomplayer-svn2012-08-031-0/+2
| | | | | | | | | RM demuxer: set aspect from container video dimensions. Fixes the sample from FFmpeg trac issue #785. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34850 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* ao_alsa: cleanup use of vsnprintfmplayer-svn2012-08-031-1/+0
| | | | | | | | vsnprintf always 0-terminates the string, so remove extra code to do this explicitly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34841 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* ad_mad: cleanupsmplayer-svn2012-08-031-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34827 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34828 b3059339-0415-0410-9bf9-f77b7e298cf2 libmad: set i_bps only if it is not already set. Since that value is only based on the very first MP3 frame, it is very likely to be much less accurate than any existing value from a demuxer. Patch by Benoît Thébaudeau. Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34829 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* vf_spp, vf_fspp: replace use of deprecated libav functionmplayer-svn2012-08-032-2/+2
| | | | | | | Replace use of deprecated dsputil_init() by ff_dsputil_init(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34816 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: diego
* AF: remove af_statswm42012-08-033-162/+0
| | | | This was not very useful.
* commands, dvd, dvdnav, bluray: cleanup sub/audio track language displaymplayer-svn2012-08-0310-87/+150
| | | | | | | | | | | | | | | | | | | | | Code cleanup: Use a stream_control instead of global functions to get the language associate with a audio or subtitle stream from the streaming layer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34736 b3059339-0415-0410-9bf9-f77b7e298cf2 Support showing the stream language with br:// playback. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34737 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix DVDs showing the subtitle language as "unknown" for a long time. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34777 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar Note: heavily modified by wm4 for this fork of mplayer.
* vf_uspp: fix possible crash when the output format is Y8mplayer-svn2012-08-031-0/+2
| | | | | | | | Fix possible crash when using -vf uspp,format=y8 i.e. the destination format is Y8. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34805 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_rtp: fix compilation with new LIVE555 librariesmplayer-svn2012-08-031-0/+2
| | | | | | | Patch by Marty Jack, martyj19 comcast net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34800 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: cehoyos
* cache2: allow cache sizes up to 4 TBmplayer-svn2012-08-036-42/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove variable that is only assigned but never used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34791 b3059339-0415-0410-9bf9-f77b7e298cf2 Allow using a cache size of up to 4 TB. Obviously anything close to 4 GB will always fail on 32 bit systems. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34792 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace off_t by int64_t in cache code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34793 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove casts that are no longer necessary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34794 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix header file after r34793. Patch by Stephen Sheldon, sfsheldo gmail com. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34802 b3059339-0415-0410-9bf9-f77b7e298cf2 Put #include <inttypes.h> into the header file where it should be. Reported by Stephen Sheldon, sfsheldo gmail com. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34798 b3059339-0415-0410-9bf9-f77b7e298cf2 Correct r34798. The header only needs stdint.h while the C file needs inttypes.h. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34799 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* example.conf: add bandwidth examplemplayer-svn2012-08-031-0/+4
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34782 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: compn
* vf.c: increase default alignment valuesmplayer-svn2012-08-031-4/+3
| | | | | | | | | Adjust MPlayer default alignment values to match FFmpeg's. Fixes "stride changed" errors when using e.g. MPEG-2 decoder with -vf unsharp. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34753 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* dec_audio: add sanity check against 0 channelsmplayer-svn2012-08-031-0/+2
| | | | | | | | Add a safeguard to avoid crash if the decoder e.g. claims 0 channels. That would be a decoder bug, but an extra check can still help. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34738 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_audio: do not decode ID3v2 tag data as audio datamplayer-svn2012-08-031-10/+53
| | | | | | | | | | | | | | | | | Minor simplification. Part of patch by Benoît Thébaudeau [benoit thebaudeau () advansee com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34718 b3059339-0415-0410-9bf9-f77b7e298cf2 Detect ID3v2 tag at the end of the file and stop demuxing before its start. Avoids trying to decode its data as MP3. Patch by Benoît Thébaudeau [benoit thebaudeau {} advansee com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34719 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* vf_yadif: fix green bottom linemplayer-svn2012-08-031-2/+13
| | | | | | | | | | | | Fix green bottom line on yadif with certain parity. This implementation of the filter method needs a padding, that mplayer allocates but never fills with data. Do the padding properly and tweak the height alignment to even number of lines, instead of rounding to 32. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34691 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: iive
* libmpcodecs: use 128 instead of 64 to define non-native RGB image formatsmplayer-svn2012-08-032-18/+18
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34659 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: cehoyos