summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demuxer.c
Commit message (Collapse)AuthorAgeFilesLines
* Do not cast the results of malloc/calloc/realloc.diego2010-02-261-2/+1
| | | | | | | | These functions return void*, which is compatible with any pointer, so there is no need for casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
* Drop weird and unnecessary _s/_st suffixes from demuxer struct names.diego2010-02-211-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30686 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not discard stream buffer on eof, instead reuse it to slightly improvereimar2010-02-201-1/+1
| | | | | | | format autodetection with -nocache and non-seekable streams. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30668 b3059339-0415-0410-9bf9-f77b7e298cf2
* Print demuxer name in "freeing demuxer" message.reimar2010-02-201-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30666 b3059339-0415-0410-9bf9-f77b7e298cf2
* libmpdemux: Mark functions not used outside of their files as static.diego2010-02-171-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30612 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove ds_fill_buffer calls from demux_resync, they cause issues at least withreimar2010-01-261-2/+5
| | | | | | | | the ASF demuxer (seek seems to end up right after the keyframe?) and seem to have no purpose anyway. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30438 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for parsing MLP and TrueHD.reimar2010-01-241-0/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30427 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove now unused variables.reimar2010-01-241-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30423 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reset the parser on seek. Should fix some cases of audio "blips" after seeking.reimar2010-01-241-6/+23
| | | | | | | AC3 is still broken due to the libavcodec parser being broken. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30421 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move the resync-related code into more consistent places instead of having itreimar2010-01-241-35/+22
| | | | | | | 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
* Add support for parsing audio streams (though should be easy to extend to video)reimar2009-12-271-1/+135
| | | | | | | | | | | via libavcodec. Parsing can be done at the demuxer stage (currently disabled) or at the decoder (ad_ffmpeg, enabled). Should allow using the libavcodec AAC, DTS, ... decoders independent of container format. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30130 b3059339-0415-0410-9bf9-f77b7e298cf2
* Free demuxer->teletext when closing the demuxer.reimar2009-11-101-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29874 b3059339-0415-0410-9bf9-f77b7e298cf2
* demuxer.c: Add initialization missing from previous commituau2009-11-021-21/+5
| | | | | | | | | | | | | Reimar's previous commit ("Unbreak the demuxer-specific code in video.c with e.g.") added the new field "non_interleaved" in demux_stream structs, but this field was not initialized anywhere. Under suitable circumstances this could cause a "Too many video/audio packets in the buffer" error and failing playback. Fix the problem by cleaning up the code that creates new instances of the struct. Now fields will be initialized to 0 by default. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29812 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reduce verbosity if demuxer sets an info value to the same as the current value.reimar2009-09-141-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29676 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reuse ds_get_packet in ds_get_packet_ptsreimar2009-08-231-11/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29546 b3059339-0415-0410-9bf9-f77b7e298cf2
* Handle demuxers that never set filepos by using stream_tell.reimar2009-08-171-2/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29528 b3059339-0415-0410-9bf9-f77b7e298cf2
* Print information about chapters with -identify.reimar2009-06-281-0/+7
| | | | | | | Patch by Adrian Stutz [adrian sttz ch] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29408 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add standard license header to all files in libmpdemux.diego2009-05-081-1/+19
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29280 b3059339-0415-0410-9bf9-f77b7e298cf2
* Update demuxer->sub->id and demuxer->sub->sh if a new subtitle stream isreimar2009-03-291-0/+4
| | | | | | | | created that matches the user-requested one. Fixes -slang and -sid with DVDs (anything that uses demux_mpg actually). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29095 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove native nuv demuxer, it only needs more code to achieve the same thingreimar2009-03-091-2/+0
| | | | | | | as the libavformat demuxer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28907 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of pointless 'extern' keywords.diego2008-12-031-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
* MNG demuxer by Stefan Schuermans, stefan blinkenarea orgdiego2008-11-301-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28052 b3059339-0415-0410-9bf9-f77b7e298cf2
* Give a CONFIG_ prefix to preprocessor directives that lacked one anddiego2008-08-071-2/+2
| | | | | | | change arbitrary prefixes to CONFIG_. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27429 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l: MUSEPACK --> CONFIG_MUSEPACKdiego2008-08-071-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27427 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename a bunch of miscellaneous preprocessor directives.diego2008-08-071-1/+1
| | | | | | | Switch them from a HAVE_ to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27423 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename preprocessor directives related to image libraries.diego2008-08-051-1/+1
| | | | | | | Change a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27417 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change a bunch of codec-specific preprocessor directives from a HAVE_diego2008-08-021-3/+3
| | | | | | | prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27395 b3059339-0415-0410-9bf9-f77b7e298cf2
* Start unifying names of internal preprocessor directives.diego2008-07-301-9/+9
| | | | | | | | Replace all USE_ prefixes by CONFIG_ prefixes to indicate options which are configurable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid including avcodec.h in demuxer.h (and thus many other files) just to getreimar2008-07-171-0/+7
| | | | | | | | | FF_INPUT_BUFFER_PADDING_SIZE. Instead use MP_INPUT_BUFFER_PADDING_SIZE and add a preprocessor check that it is big enough. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27314 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove useless parentheses, align.diego2008-06-161-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27091 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support NULL name parameter for demuxer_add_chapter.reimar2008-06-161-1/+1
| | | | | | | Patch by Anton Khirnov [wyskas gmail com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27089 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Break overly long lines.diego2008-06-161-97/+178
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27088 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: indentation, whitespace changesdiego2008-06-161-648/+645
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27087 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: consistent * placementdiego2008-06-161-21/+21
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27086 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: one more if brace placement fixdiego2008-06-161-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27085 b3059339-0415-0410-9bf9-f77b7e298cf2
* M-x untabifydiego2008-06-161-24/+24
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27084 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove all trailing whitespace.diego2008-06-161-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27083 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Split/join multiline statements.diego2008-06-161-4/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27082 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Consistently format all if, for, while constructs.diego2008-06-161-140/+170
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27081 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove one more commented-out line.diego2008-06-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27080 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Make all function declarations consistent by moving the openingdiego2008-06-161-42/+90
| | | | | | | braces to the next line and breaking long lines. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27079 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove one more commented-out line.diego2008-06-161-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27078 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove pointless comments and commented-out code.diego2008-06-161-19/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27077 b3059339-0415-0410-9bf9-f77b7e298cf2
* added and reused demux_flush() instead of emptying the demux_stream buffers;nicodvb2008-06-021-20/+10
| | | | | | | patch by Bryan Henderson - giraffedata gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26958 b3059339-0415-0410-9bf9-f77b7e298cf2
* Initialize sh_audio/sh_video->dsreimar2008-05-271-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26908 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify/make new_sh behaviour more consistent when a stream gets redefined.reimar2008-05-271-3/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26907 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: simplifyreimar2008-05-271-3/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26906 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move native musepack demuxer further down in demuxer listreimar2008-05-271-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26905 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove pointless parentheses from return statements.diego2008-05-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26790 b3059339-0415-0410-9bf9-f77b7e298cf2
* Revert r26411: policy violationrtogni2008-04-191-963/+812
| | | | | | | | | Reindent of the file is not allowed Controversial cosmetics changes with no previous discussion Mix cosmetics and non-cosmetic changes git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26469 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reformat demuxer.cuau2008-04-121-812/+963
| | | | | | | | Indent with "indent -kr -l79 -nut" and fix various suboptimal results by hand. Also remove some commented-out cruft and one unnecessary case of parentheses as in "return (r)". git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26411 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove global demuxer_typeuau2008-04-121-1/+1
| | | | | | | It was only used inside one function. Change it to a local variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26410 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused function demux_read_data_packuau2008-04-111-17/+0
| | | | | | | | According to VCS history this function has never been used since it was added in 2001... git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26401 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support 'default' attribute for audio and subtitle tracks.eugeni2008-03-301-0/+28
| | | | | | | | | The first default track is chosen for playback if language-based selection failes. Additionally, for audio tracks, the first one is chosen if there are no default tracks at all. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26301 b3059339-0415-0410-9bf9-f77b7e298cf2
* Set audio->sh correctly when switching audio tracks. The same for video tracks.eugeni2008-02-291-0/+8
| | | | | | | | | Demuxers almost never update audio->sh or sub->sh when swithing tracks. It is especially bad when switching to no sound, and results in "too many audio packets" error. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26121 b3059339-0415-0410-9bf9-f77b7e298cf2
* Don't select subtitle track in lavf and mkv demuxers.eugeni2008-02-291-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26120 b3059339-0415-0410-9bf9-f77b7e298cf2
* Demuxer-independent functions for selecting tracks based on language.eugeni2008-02-291-0/+32
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26118 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove stupid checks of free() argument.eugeni2008-02-291-8/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26117 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add language info to sh_sub_t and sh_audio_t.eugeni2008-02-291-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26114 b3059339-0415-0410-9bf9-f77b7e298cf2
* in ds_fill_buffer() disabled the code that demuxes until the arrival of the ↵nicodvb2008-02-251-0/+2
| | | | | | right reference_clock git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26103 b3059339-0415-0410-9bf9-f77b7e298cf2
* New member in demuxer_t: reference_clock.nicodvb2008-02-231-0/+9
| | | | | | | | | | | | | If it's != MP_NOPTS_VALUE ds_fill_buffer() will keep on demuxing until the pts of the next_pts is <= reference_clock. It guarantees the compliance with the buffering model indicated by the transmitter of the multiplex and a long-time stability of playback (at least for me). In any case up to a maximum of 64 packets are accumulated to prevent memory hogging and leaks. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26069 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change to always use MP_NOPTS_VALUE (instead of sometimes 0) for unknown pts.reimar2008-02-121-3/+2
| | | | | | | | I did not see anything obvious that would break, it if it does it should be fixed properly once and for all. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25988 b3059339-0415-0410-9bf9-f77b7e298cf2
* Allow demuxers to choose a default value for correct_ptsreimar2008-02-031-4/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25951 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use defines to give names to the different seek flags.reimar2008-01-291-2/+2
| | | | | | | | A better solution should be considered later, esp. for the many broken demuxers that do not treat these flags correctly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25911 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make mov subtitles work with -assreimar2008-01-291-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25909 b3059339-0415-0410-9bf9-f77b7e298cf2
* clarify comments/docs about lav* being the preferred place to implement newivo2008-01-281-2/+4
| | | | | | | | codecs and (de)muxers, except for wrappers around external libraries and codecs and (de)muxers requiring binary support. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25908 b3059339-0415-0410-9bf9-f77b7e298cf2
* copy note on new demuxers and codecs to the top of the array as well to beivo2008-01-281-0/+3
| | | | | | | extra clear git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25904 b3059339-0415-0410-9bf9-f77b7e298cf2
* note on new demuxers and codecs, add them to lav* instead of libmp*ivo2008-01-281-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25900 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make all demuxer_desc_t const, thus moving them to .rodatareimar2008-01-131-42/+42
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25735 b3059339-0415-0410-9bf9-f77b7e298cf2
* First step towards making all demuxer_desc_t constreimar2008-01-131-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25734 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove a useless assignment (there is an if just a few lines abovereimar2008-01-131-1/+1
| | | | | | | that ensures those two are already equal). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25733 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a forgotten #ifdef USE_ASS around ass_free_trackreimar2008-01-131-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25730 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add demuxer interface for attachments.eugeni2008-01-121-0/+22
| | | | git-svn-id: svn://svn.mplaye