Commit Graph

267 Commits

Author SHA1 Message Date
eugeni 377d745ae9 Set audio->sh correctly when switching audio tracks. The same for video tracks.
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
2008-02-29 17:25:48 +00:00
eugeni c85a382afa Don't select subtitle track in lavf and mkv demuxers.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26120 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-29 17:25:47 +00:00
eugeni 2c8e65329f Demuxer-independent functions for selecting tracks based on language.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26118 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-29 17:25:43 +00:00
eugeni 579e353b0f Remove stupid checks of free() argument.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26117 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-29 17:25:41 +00:00
eugeni 85a8aa6f8e Add language info to sh_sub_t and sh_audio_t.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26114 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-29 17:25:33 +00:00
nicodvb e063c10ea9 in ds_fill_buffer() disabled the code that demuxes until the arrival of the right reference_clock
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26103 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-25 22:29:45 +00:00
nicodvb 8f0095af65 New member in demuxer_t: reference_clock.
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
2008-02-23 10:31:44 +00:00
reimar df6f7b80c6 Change to always use MP_NOPTS_VALUE (instead of sometimes 0) for unknown pts.
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
2008-02-12 10:48:42 +00:00
reimar 40dca58f37 Allow demuxers to choose a default value for correct_pts
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25951 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-03 12:14:29 +00:00
reimar 5960ddb8e5 Use defines to give names to the different seek flags.
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
2008-01-29 15:11:38 +00:00
reimar 4134a853e4 Make mov subtitles work with -ass
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25909 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-29 14:30:53 +00:00
ivo f3216dba06 clarify comments/docs about lav* being the preferred place to implement new
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
2008-01-28 22:09:21 +00:00
ivo 572d74b206 copy note on new demuxers and codecs to the top of the array as well to be
extra clear


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25904 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-28 16:03:22 +00:00
ivo 1203499e51 note on new demuxers and codecs, add them to lav* instead of libmp*
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25900 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-28 12:11:41 +00:00
reimar 35ef167321 Make all demuxer_desc_t const, thus moving them to .rodata
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25735 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-13 16:00:39 +00:00
reimar df7c312313 First step towards making all demuxer_desc_t const
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25734 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-13 15:47:24 +00:00
reimar f1df834442 Remove a useless assignment (there is an if just a few lines above
that ensures those two are already equal).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25733 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-13 15:41:21 +00:00
reimar b58f5adbfd Add a forgotten #ifdef USE_ASS around ass_free_track
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25730 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-13 13:37:19 +00:00
eugeni c0e1f353e0 Add demuxer interface for attachments.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25685 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-12 01:12:36 +00:00
eugeni 0d36212f39 Remove global_ass_track. Instead create an ass_track for each 't' track.
Global_ass_track obviously can not work when there is more than one 't tracks,
their lines will be mixed up.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25684 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-11 21:45:20 +00:00
eugeni d9d27bb8c4 Init and destroy ass_tracks in demuxer.c based on sh_sub->type value.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25682 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-11 21:45:15 +00:00
eugeni 18e9531401 Add extradata to sh_sub_t.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25680 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-11 21:45:10 +00:00
eugeni 0039652a08 Deallocate audio track codecdata.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25642 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-07 14:13:50 +00:00
nicodvb a913d90614 wrapper functions to get/set angle: the wrapping is needed to RESYNC the demuxer; patch by oattila chello hu
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25603 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-05 14:28:57 +00:00
reimar 77e2ce680b Move ds->current=NULL; further up to the free_demux_packet.
This does not change behaviour in the normal case but avoids
a double-free if the function is aborted via a signal handler.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25472 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-20 11:21:02 +00:00
ulion e34efdf167 Add demuxer functions for chapter feature.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25386 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-13 12:51:05 +00:00
ulion 24dafeee09 Fix memory leak that tmp allocated but maybe not used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25342 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-10 14:43:09 +00:00
lu_zero a1fe08b750 Make libnemesi use specific struct and DEMUXER_TYPE
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25294 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-04 13:05:25 +00:00
reimar a47c3bec6d Fix typos in comments to stop them hurting my eyes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25225 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-01 13:35:25 +00:00
uau 1f5bb6386e demuxer.c: Remove useless code
Remove "while(1) { }" around two instances of code that always do
"return" in the loop body. No functionality changes.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24854 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-10-25 19:21:24 +00:00
uau 1c5d870414 Fix missing subtitles after seeking back
Subtitle packets that had been demuxed but whose start time had not
yet been reached were left in the demuxer stream after seeking.
When using the default (non-libass) subtitle rendering this could
block subtitles from appearing as long as the playback position stayed
below the original one before seek. External subtitle files were not
affected.

Fixed by making seek code free all packets from the subtitle stream.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24698 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-10-04 02:35:34 +00:00
lu_zero 0ff4b3fd9f libnemesi support, yet another rtsp/rtp library...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24584 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-19 21:38:22 +00:00
diego 01d92a32ad cosmetics: typo fix UNSUPORTED --> UNSUPPORTED
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24277 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-28 22:38:45 +00:00
reimar 185bc3320f When a new subtitle stream becomes available check if it is the one that
was requested by the user and set up sub->id and sub->sh accordingly.
Fixes -slang and -sid with DVD subtitles (basically only 'j' during playback
could make them show). This was broken by r23786.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24042 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-09 10:26:00 +00:00
reimar 5bd192c77d Make sure fformat is set before use
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23885 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-27 20:25:43 +00:00
reimar 958fc672cb Remove some unneeded extern variable declarations
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23884 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-27 20:22:55 +00:00
reimar f36073916f make opt argument of demux_info_get const.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23631 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-24 10:20:42 +00:00
reimar 74047be59a Fix memleak due to not freeing demuxer->s_streams
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23612 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-23 17:39:27 +00:00
zuxy 276394a205 More accurate seeking for demuxers lacking DEMUXER_CTRL_GET_TIME_LENGTH control
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23572 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-17 13:28:52 +00:00
reimar 6a09e8e2ed Replace implicit use of fast_memcpy via macro by explicit use to allow
for future optimization.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23475 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-05 14:27:54 +00:00
diego 05c7a055e8 Simplify preprocessor directives: There is a general variable for
static/shared FFmpeg libraries now.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23139 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-26 15:10:07 +00:00
reimar b5aa994f1c Cosmetics: remove duplicate space in ifdef
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23090 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-22 20:59:14 +00:00
nicodvb effc6dcf23 demuxer_desc_lavf_preferred depends on USE_LIBAVFORMAT or USE_LIBAVFORMAT_SO
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23087 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-22 20:32:15 +00:00
reimar ef91f5aad8 Add lavf_preferred demuxer for lavf formats we want to be probed
before our native demuxers and remove some now unneeded file-extension
hacks.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22989 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-14 10:03:42 +00:00
diego e085bc8dcf Add explicit location for headers from the stream/ directory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22623 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-15 18:36:36 +00:00
uau c60af33716 Move the sh_audio->delay field to mpctx->delay.
The value is related to overall a/v sync and is not used by audio
demuxers or decoders.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22506 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-11 06:16:14 +00:00
rathann 45defa1aa0 Fix a few gcc warnings, approved by Diego and Reimar.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22160 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-05 23:46:08 +00:00
reimar 9e1add871e Make ds_get_next_pts return MP_NOPTS_VALUE instead of -1 on error,
-1 could be a perfectly valid pts.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21827 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-05 15:24:38 +00:00
nicodvb 55303b223e removed unused variable
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21803 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-31 17:24:14 +00:00
nicodvb 8558d03eb9 use demuxer->stream_pts rather than stream_control(STREAM_CTRL_GET_CURRENT_TIME)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21798 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-31 11:09:53 +00:00