summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* terminal output: show libav version numbers in verbose modeUoti Urpala2011-10-013-0/+29
|
* demux_mkv: avoid hang with some broken filesUoti Urpala2011-09-251-0/+4
| | | | | Return failure to open file in one case that could lead to an infinite loop with broken Matroska files before.
* subreader.c: don't run FriBiDi code if using libassUoti Urpala2011-09-231-1/+4
| | | | | | | | Libass has its own BiDi handling now, and preprocessing the subtitles with FriBiDi before passing them to libass breaks things. Disable our own FriBiDi code when libass rendering is used. This affects external subtitle files of other formats parsed with subreader.c and converted to ASS tracks.
* sd_ass.c: set event->Style to fix --ass-stylesUoti Urpala2011-09-231-0/+1
| | | | | | | | | | | | | Set the "Style" attribute for subtitle events created in sd_ass to match the "default_style" attribute of the track. This is required to make --ass-styles work with recent libass versions (otherwise the event would use style 0, which is a fallback style added by libass now). Commit 378ada847c8eb3a641392691b1a2317f8fc214e0 ("sub/ass: use default style, not first style unconditionally") fixed the same issue for external subtitles converted with mp_ass_read_subdata(); this commit fixes it for muxed ones.
* codecs.conf: add Libav ProRes decoderUoti Urpala2011-09-231-0/+11
|
* options: make "choice" option type parsing ignore caseUoti Urpala2011-09-111-1/+1
|
* core: fix --sstepUoti Urpala2011-09-041-1/+1
| | | | | The --step option had broken at some point. Probably nobody uses it, but it was easy to fix.
* cosmetics: mplayer.c: minor tweaksUoti Urpala2011-09-041-21/+8
|
* options: --pphelp: fix after libpostproc version changeUoti Urpala2011-09-041-1/+1
| | | | | | | | | | The last libpostproc major version change from 51 to 52 changed the type of the "pp_help" symbol from a pointer to help text to the help text itself. This made --pphelp crash. Change the option definition to match the new type. This probably makes it crash if compiled against older libpostproc, but the option is not important enough to try supporting that (I've seen no reports of the crash, probably people just don't use the option).
* options: add "disabled option" functionalityUoti Urpala2011-09-044-14/+44
| | | | | | | | | | | Add functionality to mark options that depend on features disabled at compile time as disabled rather than not compiling the option definitions at all. This allows printing a warning about the option not being available because of a disabled feature, instead of just "unknown option". Because the option definitions are still compiled fully, this only works for definitions that do not reference symbols which are not available if the feature is disabled. Use the new functionality for options depending on libass.
* input/ar.c, input/lirc.c: fix changes missing from 1916b95b8Uoti Urpala2011-09-042-1/+3
| | | | | | | | | | | | | 1916b95b8 changed two function types from returning "void" to returning "int", but was missing changes to add "return 0;" to the functions. Fix. The reason for the change in the original commit was that the functions were called through a function pointer returning int anyway, so the missing return probably made things no more likely to fail at runtime than they were before that commit. However, it caused a compilation failure with clang, which treats non-void function not returning a value as a fatal error (in GCC it's just a warning).
* options: move libass-related options to structUoti Urpala2011-09-0310-96/+91
|
* subassconvert: handle "\r\n" line endsClément Bœsch2011-09-021-1/+1
| | | | | | | | | Previously the code converting text subtitles to ASS format converted newline characters, and only those, to ASS "new line" markup. If the subtitles contained "\r\n", the "\r" was thus left in the text. In previous libass versions the "\r" was not visible, but in the current one it produces an empty box. Improve the conversion to remove the "\r" in that case. Also treat a lone "\r" as a newline.
* demux_mf: fix option value allocated with strdupUoti Urpala2011-09-021-1/+2
| | | | | | demux_mf allocated the "type" suboption of "--mf" with strdup if it was not explicitly set. This caused a crash after playing an mf:// entry. Fix to use talloc instead.
* options: commandline: support "--no-opt" for flag optionsUoti Urpala2011-09-011-6/+39
| | | | | | | | | | | | | | | When parsing the command line, map "--no-foo" to "--foo=no" if an option named "foo" exists and is a flag option. Non-empty parameters are not allowed with this syntax ("--no-foo=no" is invalid). This implementation is different from the existing "--nofoo" variants for most flag options. Those are implemented as completely separate options; there's an option named "fs" and a separate option named "nofs" (thus "--no-nofs" actually works after this change...). The reason for adding the new syntax is to support the much more standard "--no-" prefix and to allow eventually cleaning up the option handling (though the "nofoo" variants of existing options can't be removed soon due to backwards compatibility).
* csputils/vo_gl: rewrite YUV->RGB matrix generationUoti Urpala2011-08-292-77/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the csputils.c code generating a conversion matrix for YUV->RGB conversions (currently used by vo_gl only). Functional differences: - The separate "mplayer default" colorspace is removed, and BT.601 is used instead (the default colorspace was in fact BT.601; see below). - The old code was missing chroma scaling. As a result the "mplayer default" colorspace actually mapped to BT.601, and everything else was buggy (I guess the other colorspaces were added with particular coefficient semantics, without understanding that the original "default colorspace" was actually BT.601 and why its coefficients differed from the added version). - The old code had a bug in the equalizer hue equations. - The old code assumed that for specifying whether input and output were limited-range or full-range YUV or RGB it would make sense to specify "no conversion" meaning full-range YUV to full-range RGB or limited-range YUV to limited-range RGB. This isn't true; limited- range YUV has different ranges for luma and chroma (16-235 vs 16-240) which means you have to scale chroma for limited->limited conversions. The new code assumes limited->limited conversions for the levelconv parameter 2. It'd probably make sense to change the API later to specify the ranges of input and output separately. - The undocumented EBU and XYZ colorspaces are removed. I doubt any videos use these. Also the EBU colorspace looks like it'd expect a different input range - at least no input would map to full RGB red as it was.
* cosmetics: csputils.[ch]: reindentUoti Urpala2011-08-282-138/+146
|
* demuxer.h: raise pad amount to allow compiling against FFmpegUoti Urpala2011-08-261-1/+1
| | | | | | | | FFmpeg has increased FF_INPUT_BUFFER_PADDING_SIZE to 16 (unlike Libav which still has it at 8). Raise MP_INPUT_BUFFER_PADDING_SIZE to 16 to allow compilation against FFmpeg too (demuxer.c checks the padding size for packets is at least as much as libavcodec wants for its decoders, and this check failed with the previous value of 8).
* core: remove bad workaround for files without FPS setUoti Urpala2011-08-251-7/+2
| | | | | | | | | | | | | Commit dde8b753e4 merged an mplayer1 change (r31328) that set correct_pts to true if FPS was not set (on the assumption that correct-pts mode could provide proper timing without FPS). As the merge commit noted this change was somewhat questionable, as the option shouldn't really change after things have already been initialized. After recent changes it can cause an outright crash (assert in ds_get_packet2() from 9c7c4e5b7d fails). Remove the hack. Also only print a warning about not having FPS if correct_pts is not set (in correct_pts mode not having FPS shouldn't be a real problem, as everything is based on timestamps anyway).
* video_out.h: change VOCTRL_* defines to enumharklu2011-08-251-54/+56
| | | | | | | | Convert the list of VOCTLR_* defines to an enum, dropping some unused values. This resolves a collision between VOCTRL_XOVERLAY_SET_COLORKEY and VOCTRL_REDRAW_OSD, which had the same value (the XOVERLAY one was only used by vo_xvr100 and vo_tdfx, so this didn't matter much in practice).
* ad_ffmpeg: free resources on init failureUoti Urpala2011-08-211-4/+12
| | | | | | | | | | ad_ffmpeg init() function did not free resources if opening failed. Outside code (dec_audio.c) does not automatically call uninit() if init() returns failure, and the uninit function would have crashed in some cases had it been called (it did freed lavc_context->extradata, but lavc_context could have been NULL after early init failure). Add explicit calls to uninit() after failure and make uninit function safe to call at any point.
* ad_ffmpeg: handle timing for partially decoded packets betterUoti Urpala2011-08-211-7/+23
| | | | | | | | | | | | | | | | | | | | | | | At least the libavcodec WavPack decoder can return output for an audio frame in multiple parts and return 0 bytes input consumed for the initial parts. Timing info was not set correctly in this case: sh_audio->pts and pts_bytes were reset each time when decoding more from the packet, as if the packet had been new (ds_get_packet_pts() has a check to return MP_NOPTS_VALUE if the packet has already been partially read, but that didn't trigger since libavcodec returned exactly 0 bytes read so the demuxer-visible packet state didn't change). Add a field to keep track of whether a packet has already been decoded from, and don't reset timing info again if so. Adding the field requires adding a decoder context to store it (there wasn't one before). BTW the WavPack decoder behavior and avcodec_decode_audio3() documentation don't match - the documentation says the return value is "zero if no frame data was decompressed (used) from the input AVPacket", while the decoder DOES return some frame data which comes from the input packet.
* cosmetics: ad_ffmpeg.c: reformatUoti Urpala2011-08-211-131/+137
|
* demux_lavf: Adding av_dup_packet() missing from recent 6e8d420a41Uoti Urpala2011-08-211-0/+5
| | | | | | | | | Commit 6e8d420a41 ("demux: avoid a copy of demux packets with lavf, reduce padding") was missing an av_dup_packet() line. As a result at least formats that use parsing on the lavf side could fail (with parsing the packet may contain pointers to temporary fields that will be overwritten/freed when reading further packets, and av_dup_packet() is required to allocate permanent storage).
* osdep/mplayer.rc: change to use "mplayer2" nameMartin Herkt2011-08-211-7/+6
|
* configure: libav: use "pkg-config --print-errors", "Libav" nameUoti Urpala2011-08-211-9/+9
| | | | | | | | | | | | Use the "--print-errors" flag of pkg-config when testing for the presence of Libav libraries. Even though the error output is a bit messy (printed on the same "Checking for"... line), it does contain useful information for this test which checks for several libraries at once. Also change the test name from "FFmpeg" to "Libav" and rename the option from --disable-ffmpeg to --disable-libav. The change should cause no compatibility problems as the option is very rarely used.
* demux_mkv: fix failure to open some files from 0ece360eeaf95Uoti Urpala2011-08-201-32/+23
| | | | | | | | After 0ece360eeaf95 ("demux_mkv: skip files faster in ordered chapter file search") some Matroska files failed to open. The problem was that demux_mkv_read_info() returned 0 on success, but the opening code interpreted this as a value to stop parsing further headers. Fix this and also modify some of the other return value handling.
* core, demux, vd_ffmpeg: pass side data from demux_lavf to vd_ffmpegUoti Urpala2011-08-208-40/+91
| | | | | | | | | | | | Pass the libavformat packet side_data field from demux_lavf to vd_ffmpeg. Libavcodec/libavformat use this field for palette data, and passing it is required for the playback of some paletted video codecs. The implementation works by giving vd_ffmpeg a copy of the struct demux_packet used to store the video packet (from which it can access the avpacket field). The definition of struct demux_packet is moved to new file demux_packet.h so that vd_ffmpeg.c can use it without including all of demuxer.h.
* demux_mkv: support extradata for wavpack audio tracksUoti Urpala2011-08-201-12/+11
| | | | | | | | Export the codec private data field for WavPack and TrueHD audio tracks. At least for WavPack this is necessary to make some samples work. Also change some other cases to use the same data-copying code.
* demux_mkv: clean up audio codec handling somewhatUoti Urpala2011-08-201-91/+78
|
* demux_mkv: check for valid track in video/audio switchingUoti Urpala2011-08-201-6/+20
| | | | | | | | | | | | When switching audio or video tracks, demux_mkv only checked that the new index fell in the range corresponding to tracks existing in the file being played. However, if the demuxer can not recognize the format of a track or detects an error, some of those tracks in the file may not be exported from the demuxer and are not visible to the rest of the player. Selecting such a track would cause a crash. Add checks skip such tracks when cycling to next track and switch to nosound instead if given an explicit track number corresponding to such a track.
* demux_mkv: remove bad mkv_free() from 0ece360eeaf9Uoti Urpala2011-08-191-1/+0
| | | | | | | | demuxer.c calls demuxer->close() even if opening failed. Thus the mkv_free() call added in 0ece360eeaf95f ("demux_mkv: skip files faster in ordered chapter file search") was wrong, and could cause a crash from a double free if some data structures were allocated before the opening attempt was aborted.
* demuxer.h: avoid including stream.hUoti Urpala2011-08-195-1/+6
| | | | | | Drop the unnecessary include and add a missing direct include in some files. This also revealed that demux_rtp_internal.h was missing a config.h include, fix that too.
* aviheader.h: avoid including demuxer.hUoti Urpala2011-08-193-2/+4
| | | | | | | Remove unnecessary demuxer.h include from aviheader.h. Through stheader.h aviheader.h is included in a lot of files. Add missing mp_msg.h includes to av_sub.c and sd_ass.c (previously hidden by indirect inclusion through demuxer.h and stream.h).
* demux: avoid a copy of demux packets with lavf, reduce paddingUoti Urpala2011-08-193-26/+45
| | | | | | | | | | | | | When demux_lavf read a new packet it used to copy the data from libavformat's struct AVPacket to struct demux_packet and then free the lavf packet. Change it to instead keep the AVPacket allocated and point demux_packet fields to the buffer in that. Also change MP_INPUT_BUFFER_PADDING_SIZE to 8 which matches FF_INPUT_BUFFER_PADDING SIZE; demux_lavf packets won't have more padding now anyway (it was increased from 8 earlier when FF_INPUT_BUFFER_PADDING_SIZE was increased in libavcodec, but that change was reverted).
* talloc.[ch]: remove "type safety" hack that violates C typesUoti Urpala2011-08-192-8/+4
| | | | | | | | | | | | The destructors used by talloc take a "void *" first parameter. However talloc.h had a #define hack that treated the destructor as a function taking first parameter of type "typeof(ptr)" where ptr is the pointer the destructor is set for. I suppose this was done to add some kind of "type safety" against adding a destructor expecting another type of pointer; however this hack is questionable and violates the real C level typing. Remove the hack from the header and adjust talloc.c to avoid a warning about a C type violation that became visible after removing the hack.
* vf_screenshot: better check for pixel format swscale supportharklu2011-08-171-40/+14
| | | | | | | | | | vf_screenshot checked for a list of pixel formats that were known to work with swscale. However, the list was incomplete. If a pixel format was used that was not on the vf_screenshot list, but was supported both by swscale and the VO driver, mplayer2 would insert a useless scale filter to convert to a format supported by vf_screenshot. Fix this by making vf_screenshot check directly whether the pixel format is supported by swscale with sws_isSupportedInput().
* av_log: don't crash if called with NULL AVClassUoti Urpala2011-08-151-2/+6
| | | | | | At least libavformat mpegts demuxer may give bad parameters with NULL AVClass to the av_log callback. Check for this and print a warning instead of crashing.
* options, subs: add --ass-vsfilter-aspect-compatharklu2011-08-1210-3/+58
| | | | | | | | | Add option --ass-vsfilter-aspect-compat and corresponding property ass_vsfilter_aspect_compat. The setting controls whether to enable the emulation of traditional VSFilter behavior where subtitles are stretched if the video is anamorphic (previously always enabled for native SSA/ASS subtitles). Enabled by default. Add 'V' as a new default keybinding to toggle the property.
* vo_vpdau: fix preemption recovery broken in decec7f2a37e559dUoti Urpala2011-08-111-11/+22
| | | | | | | | Commit decec7f2a3 ("vo_vdpau: skip resize code if not fully initialized") broke preemption recovery because the resize code stayed incorrectly disabled when it would have been used to reinitialize things during recovery. Revert that commit and add different checks to avoid running various code when not in a fully functional state.
* ao_pcm: fix pointless message due to uninitialize variableUoti Urpala2011-08-111-1/+1
| | | | | | The variable corresponding to the "fast" suboption of ao_pcm was uninitialized. Fix. The only effect was possibly printing a warning about the suboption being deprecated even if it wasn't used.
* dvdnav: fix crash caused by missing line from 58834653c0Uoti Urpala2011-08-101-0/+1
| | | | | | The committed version of 58834653c0 ("dvdnav: make mp_dvdnav_save_smpi() more robust") was somehow missing one line which caused a crash with dvdnav. Add it back.
* demux_lavf: don't interpret MPEG codec tags as generic tagsUoti Urpala2011-08-101-3/+8
| | | | | | | | Don't interpret native MPEG codec tags using our generic format-agnostic codec tag tables. MPEG may use tag 3 for MP3, whereas the generic tables map 3 to uncompressed PCM. Make the code ignore the codec_tag field for the "mpeg" and "mpegts" libavformat demuxers and rely on the codec_id value provided by lavf only.
* core: allocate OSD text buffers dynamicallyharklu2011-08-094-17/+25
| | | | | | | The OSD text buffers (mp_osd_msg_t.text and osd_state.text) used to be static arrays, with the buffer sizes spread all over the code as magic constants. Make the buffers dynamically allocated and remove the arbitrary length limits.
* options: remove old disabled options that just print an errorUoti Urpala2011-08-091-60/+1
| | | | | | | Remove several old options that were deprecated and disabled years ago and whose only effect now was to show a custom error message about the option in question being deprecated and then exit. Also remove the -vd option which was just a stupid joke and never had useful functionality.
* options: support --leak-report (double dash form)Uoti Urpala2011-08-081-1/+2
| | | | | The special option --leak-report is manually checked so didn't automatically get double-dash support. Update the test.
* core: minor audio-only+timeline fix for chapter handlingUoti Urpala2011-08-081-2/+2
| | | | | | Remove outdated "!mpctx->sh_video" checks in chapter seeking and naming functions left over from when timeline functionality did not support audio-only case.
* subs: libass: apply option changes to all track typesUoti Urpala2011-08-084-10/+13
| | | | | | | | | Libass rendering uses two renderer objects to support both VSFilter aspect ratio (mis)behavior emulation and correct rendering. When option values were changed during playback the changes were applied to the renderer used for the currently active track only, and old values could be used if the user then switched to a track using the other renderer object. Fix to update both renderers.
* subs: libass: remove bad ass_set_margins() on settings resetUoti Urpala2011-08-081-1/+4
| | | | | | | | | | | When libass-related options were changed at runtime, the reinitilization code executed ass_set_margins() with arguments that were correct for the vf_ass case but wrong for EOSD. This could cause the subtitles to be displayed incorrectly for one frame (vf_vo would run ass_set_margins() again with the correct parameters for the next frame). The call is actually redundant for the vf_ass case too as it's currently not possible to modify the margins during playback, so fix the problem by disabling the call.
* cleanup: move global ass_force_reload to struct osd_stateUoti Urpala2011-08-086-27/+27
|
* commands: property sub_scale: update old subs immediatelyharklu2011-08-081-0/+2
| | | | | | When using the "old" subtitle renderer (i.e. not libass), changes to this property were not reflected immediately, and came into effect only when the next subtitle event was rendered.
* cleanup: reformat command.cUoti Urpala2011-08-071-1022/+1014
|
* cleanup: reformat mplayer.cUoti Urpala2011-08-071-2000/+2174
| | | | | | I had delayed reformatting mplayer.c as I wanted to split it, but since I didn't come up with a good way to do that I'll clean up the messy formatting now.
* commands: osd_show_property_text: fix \xNN escapesharklu2011-08-051-1/+1
| | | | | When handling escapes of the form '\xNN', m_properties_expand_string() incorrectly copied the last N to the output. Fix.
* commands: parsing: fix string argument quoting/escapingUoti Urpala2011-08-051-38/+26
| | | | | | | | | | | | | | Parsing of commands with string arguments had several problems. First, escape handling modified the original string, which broke keyboard command definitions with strings containing escapes. Second, in an argument like "\\" the second quote was incorrectly considered escaped even though the preceding '\' was itself escaped. Third, an unterminated quoted string resulted in the argument being set to NULL even if this violated the declared the minimum number of arguments to the command type; this could cause a crash in the code executing the parsed commands. Fix by rewriting the string argument parsing. Also change int/float argument parsing so that the whole command is rejected on error.
* core: fix detection of files with no chaptersUoti Urpala2011-08-041-3/+3
| | | | | | | | Initialize mpctx->last_chapter_seek to -2 instead of -1. This changes get_current_chapter() return value to -2 for files which have no chapters. -2 is used by some commands related to chapters to recognize files without chapters and return failure without any effect in that case.
* demux_mkv: skip files faster in ordered chapter file searchUoti Urpala2011-08-044-51/+95
| | | | | | | | | | | | Ordered chapter code tries opening files to find those matching the SegmentUID values specified in the timeline. Previously this scan did a full initialization of the Matroska demuxer for each file, then checked whether the UID value in the demuxer was a match. Make the scan code instead provide a list of searched-for UIDs to the demuxer open code, and make that do a comparison against the list as soon as it sees the UID in the file, aborting if there is no match. Also fix units used in "Merging timeline part" verbose message.
* options: commandline: don't print video filter list twiceUoti Urpala2011-07-311-14/+14
| | | | | | |