summaryrefslogtreecommitdiffstats
path: root/libmpdemux
Commit message (Collapse)AuthorAgeFilesLines
* 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-203-15/+51
| | | | | | | | | | | | 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-193-1/+3
| | | | | | 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-191-2/+2
| | | | | | | 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).
* 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.
* demux_mkv: skip files faster in ordered chapter file searchUoti Urpala2011-08-043-45/+85
| | | | | | | | | | | | 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.
* core: audio: if audio pts is missing return MP_NOPTS_VALUEUoti Urpala2011-07-301-1/+1
| | | | | | | Change written_audio_pts() and playing_audio_pts() to return MP_NOPTS_VALUE if no reasonable pts estimate is available. Before they returned some incorrect value typically around zero (but not necessarily exactly that).
* build: fix --enable-debug, remove some "#ifdef MP_DEBUG"Uoti Urpala2011-07-301-4/+0
| | | | | | | | | | | Recent commit 5d5ca22a6d ("options: commandline: accept --foo=xyz style options") left some bad code under "#ifdef MP_DEBUG" in playtree.c, which caused a compilation failure if configured with "--enable-debug". Fix this. Having the "#ifdef MP_DEBUG" there was completely unnecessary; it only increased the risk for this kind of problems for no real benefit - executing the asserts under it would have no noticeable performance or other penalty in default builds either. Remove several cases of such harmful "#ifdef MP_DEBUG".
* bstr: rename BSTR() -> bstr()Uoti Urpala2011-07-273-8/+8
| | | | | | Rename the BSTR() function to bstr(). The former caused a conflict with some Windows OS name, and it's no longer a macro so uppercase naming is less appropriate.
* cleanup: do libav* initialization on startupUoti Urpala2011-07-183-6/+0
| | | | | | | Do the global initialization of libavcodec and libavformat (avcodec_register_all(), av_register_all()) immediately on program startup and remove the initialization calls from various individual modules that use libavcodec/libavformat functionality.
* cleanup: silence most of the clang warningsClément Bœsch2011-07-093-5/+5
|
* demux/mp_taglists: Move Bink audio tags to override listAnton Khirnov2011-07-061-2/+2
| | | | | | | | Some versions of lavf abuse codec_tag for passing Bink version information to the decoder, which broke detection based on codec tag (though this has already stopped again in latest Libav). Move bink audio codec IDs from mp_wav_tags to mp_codecid_override_tags so that codec tags are completely ignored for them.
* Merge branch 'mplayer1_changes'Uoti Urpala2011-07-066-13/+40
|\
| * demux_rtp.cpp: Add a hack to receive audio while probing video FPSreimar2011-07-061-1/+26
| | | | | | | | | | | | | | Otherwise newer live555 versions would just hang. Fixes http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1874 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33793 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cleanup: demux_vqf: typo/wording fixesdiego2011-07-061-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33762 b3059339-0415-0410-9bf9-f77b7e298cf2
| * demux_lavf: Do not set AVIOContext for AVFMT_NOFILE formatsreimar2011-07-061-5/+7
| | | | | | | | | | | | | | | | Setting AVIOContext for AVFMT_NOFILE formats now triggers a warning from libavformat (and triggered an error for a while), so add a check to avoid setting AVIOContext when not necessary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33695 b3059339-0415-0410-9bf9-f77b7e298cf2
| * demux_lavf: fix code printing subtitle typereimar2011-07-061-2/+2
| | | | | | | | | | | | | | Fix printing of subtitle type, the wrong index was used to look up the type. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33664 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cosmetics: Fix typoscehoyos2011-07-061-1/+1
| | | | | | | | | | | | Patch by Mike Castle, dalgoda+mplayer gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33575 b3059339-0415-0410-9bf9-f77b7e298cf2
| * demux_asf: Fix play duration calculation errorib2011-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | Acording to the ASF documentation, the play duration is zero if the preroll value is greater than the play duration. The new way of determining it (suggested by reimar) prevents overflows as well. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33492 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cosmetics: asf.h: Fix comment errorib2011-07-061-1/+1
| | | | | | | | | | | | | | | | According to the ASF documentation, MF_PD_ASF_FILEPROPERTIES_PREROLL (preroll) is UINT64. Fix type mentioned in comment. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33484 b3059339-0415-0410-9bf9-f77b7e298cf2
* | demux_lavf: add missing #include <libavutil/mathematics.h>Uoti Urpala2011-07-061-0/+1
|/ | | | Not included by avutil.h any more in recent Libav versions.
* OSD: when switching sub/audio tracks show title of new trackUoti Urpala2011-07-033-3/+13
| | | | | | If the played file has per-track titles for audio and subtitles show those on the OSD when switching tracks. This changes the OSD message from 'Audio: (2) eng' to 'Audio: (2) eng ("Director's commentary")'.
* commands: change property mechanism to use talloc stringsUoti Urpala2011-07-031-6/+4
|
* cosmetics: reformat demux_lavf.c, m_option.[ch] and m_property.cUoti Urpala2011-07-031-480/+513
|
* demux: use talloc for sh_* structs and "lang" fieldUoti Urpala2011-07-034-17/+16
|
* cleanup: reindent stheader.hUoti Urpala2011-07-031-100/+102
| | | | Also improve some comments and change two fields from int to bool.
* audio: move ready-for-ao data buffer from decoder to AOUoti Urpala2011-07-021-5/+0
| | | | | | | | | | | | Move the buffer storing audio data ready to be fed to the audio output driver from the audio decoder object to the AO object. This will help encoding code deal with end of input, and may also be useful to improve other general gapless audio behavior (as AOs which do not accept chunks smaller than a certain size may keep them in the buffer while the decoder changes). Less data may be dropped now when changing audio filters or switching timeline parts.
* cleanup: fix mp_dbg() format string warningsClément Bœsch2011-07-014-16/+7
|
* demux_ts: Support S302M audiocehoyos2011-06-291-0/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33461 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: some warning fixes and minor cleanupsreimar2011-06-293-9/+5
| | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33399 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33400 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33421 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33425 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33426 b3059339-0415-0410-9bf9-f77b7e298cf2
* vd_ffmpeg: autoselect output colorspaces without codecs.confUoti Urpala2011-06-261-0/+1
| | | | | | | | | | | | | Selecting the colorspace to output from a decoder is done in the function mpcodecs_config_vo(). Add a new version of this function, mpcodecs_config_vo2(), that allows the decoder to specify a list of candidate colorspaces instead of always using a hardcoded list specified in the codecs.conf entry. If the codecs.conf entry has any "out" lines then those still take priority and the decoder-provided list (if any) is ignored. Make vd_ffmpeg provide a list of the colorspaces it's willing to output. Remove "out" lines from most entries for libavcodec video decoders in codecs.conf, so that the automatic values are now used instead.
* demux: pad even 0-size demux packet data (fixes sd_ass crash)Uoti Urpala2011-06-181-17/+10
| | | | | | | | | | | | | sd_ass relies on there being a zero byte after packet data. However the packet allocation routines special-cased data length 0 and left the data pointer as NULL in that case. This could cause a crash in sd_ass if there was an empty subtitle packet. Change the allocation routines to stop special-casing empty data and always allocate padding. Empty packets are not so common that special casing them would be a worthwhile optimization. Also fix resize_demux_packet() to use MP_INPUT_BUFFER_PADDING SIZE as the padding size, instead of a hardcoded value of 8.
* cleanup: shut up more warningsClément Bœsch2011-05-0617-30/+35
|
* cleanup: remove more warningsClément Bœsch2011-05-023-4/+4
|
* Merge branch 'mplayer1_changes'Uoti Urpala2011-05-024-3/+15
|\
| * mp_taglists.c: add CODEC_ID_ANM and CODEC_ID_AVSreimar2011-05-021-0/+2
| | | | | | | | | | | | Add mapping between codec ID and tag for ANM and AVS. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33288 b3059339-0415-0410-9bf9-f77b7e298cf2
| * demux_ts: Hint at -tsprobe option when no audio stream is founddiego2011-05-021-1/+1
| | | | | | | | | | | | patch by Godmar Back, godmar gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33271 b3059339-0415-0410-9bf9-f77b7e298cf2
| * codecs.conf, mp_taglists: add FFmpeg Bitmap Brothers JV decodercehoyos2011-05-021-0/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33125 b3059339-0415-0410-9bf9-f77b7e298cf2
| * codecs.conf, stheader.h: support CrystalHD decoding (libavcodec)cehoyos2011-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | Add the various decoders to codecs.conf and increase the maximum number of buffered pts in stheader.h (apparently CrystalHD can have very high decoder lag). Patch by Philip Langdale, philipl overt org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33095 b3059339-0415-0410-9bf9-f77b7e298cf2
| * audio: do not run the AC-3 parser on byte-swapped AC-3reimar2011-04-131-1/+4
| | | | | | | | | | | | | | | | | | Libavcodec has no parser that would work on byte-swapped AC3, but at least don't run the normal AC-3 one which would only break things. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33026 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33027 b3059339-0415-0410-9bf9-f77b7e298cf2
| * codecs.conf, mp_taglists.c: add LXF PCM and dvvideocehoyos2011-04-121-0/+4
| | | | | | | | | | | | | | | | | | | | Support audio in Leitch/Harris' VR native stream format (LXF). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32990 b3059339-0415-0410-9bf9-f77b7e298cf2 Support dvvideo in Leitch/Harris' VR native stream format (LXF). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32991 b3059339-0415-0410-9bf9-f77b7e298cf2
* | demux_ogg: fix slang selectionClément Bœsch2011-04-231-10/+4
| | | | | | | | | | | | Commit 59fff90d94 ("options: change -alang and -slang to use string list type") failed to change demux_ogg accordingly. Add the missing change.
* | Update libav API usesUoti Urpala2011-04-201-11/+14
| | | | | | | | | | | | | | | | | | | | | | Update various code to use newer alternatives instead of deprecated functions/fields that are being dropped at libav API bump. An exception is avcodec_thread_init() which is being dropped even though it's still _necessary_ with fairly recent libav versions, so there's no good alternative which would work with both those recent versions and latest libavcodec. I think there are grounds to consider the drop premature and revert it for now; if that doesn't happen I'll add a version-test #if check around it later.
* | cleanup: avoid various GCC warningsClément Bœsch2011-04-201-1/+1
| |
* | options: change -alang and -slang to use string list typeClément Bœsch2011-04-203-22/+14
| | | | | | | | | | | | | | | | | | There is no reason to use manual language list splitting when an automatic split function is already available. Some types change from "unsigned char" to "char", but this shouldn't cause issues since [as]lang settings are unlikely to have characters above 127.
* | Merge branch 'edl'Uoti Urpala2011-04-083-259/+314
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | * edl: core: support timeline with audio-only files core: wake up a bit less often for audio-only files core: audio: cut audio writes at end of timeline part EDL: add support for new EDL file format stream.[ch], ass_mp: new stream function for whole-file reads tl_matroska.c: move the find_files() function here bstr.[ch], path.[ch]: add string and path handling functions core: ordered chapters: move timeline creation to timeline/ options: drop support for numeric -demuxer values cleanup: demuxer.[ch]: remove unused code, make functions static cleanup: reindent demuxer.h, use struct names for types
| * EDL: add support for new EDL file formatUoti Urpala2011-04-053-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |