Commit Graph

167 Commits

Author SHA1 Message Date
reimar 47ba682a63 demux_ts: Fix subtitle sync issues
Ensure we queue all subtitle packets before demuxing the next video
packet.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32587 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:05:11 +02:00
cehoyos 2158f1b401 demux_ts: fix subtitle stream breaking audio track switch
Fix switching audio track with the native MPEG-TS demuxer after an
additional subtitle stream was detected.

Patch by KS Ng, hk D dmbth A gmail

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32445 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:08 +02:00
diego 1de42d8c64 demux_[mpg|ts|ty]: #include dec_audio.h for skip_audio_frame()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32431 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:08 +02:00
reimar fe6c4fcae2 cleanup: malloc+memset->calloc, sizeof(TYPE)->sizeof(*ptr)
Replace malloc+memset by calloc

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32181 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace malloc+memset by calloc.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32182 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace malloc+memset by calloc.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32183 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace some sizeof(type) by sizeof(*pointer)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32184 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace malloc+memset by calloc.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32186 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace malloc+memset by calloc.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32187 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace malloc+memset by calloc

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32188 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace sizoef(type) by sizeof(*ptrvar).
Besides being consistent with FFmpeg style,
this reduces the size of a patch to rename these
types to not conflict with the windows.h definitions.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32189 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace malloc+memset by calloc.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32191 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace malloc+memset by calloc.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32192 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace sizeof(type) by sizeof(*ptrvar)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32193 b3059339-0415-0410-9bf9-f77b7e298cf2

Remove a useless cast.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32194 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace sizeof(type)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32195 b3059339-0415-0410-9bf9-f77b7e298cf2

Remove a useless cast.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32196 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace several sizeof(WAVEFORMATEX)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32197 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace one more instance of sizeof(WAVEFORMATEX); fix compilation.
patch by Clément Bœsch, ubitux gmail com

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32199 b3059339-0415-0410-9bf9-f77b7e298cf2

Avoid some pointless uses of sizeof() and one related cast.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32200 b3059339-0415-0410-9bf9-f77b7e298cf2

Merge one malloc() + memset() invocation into calloc().

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32202 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace malloc+memset by calloc

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32203 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace sizeof(WAVEFORMATEX) occurrences.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32205 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace malloc+memset by calloc.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32206 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace sizeof(BITMAPINFOHEADER)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32207 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:16:46 +02:00
diego 7e57bfd853 demux: Move mp_a52_framesize from demux_ts.c to parse_es.c
The function is used in the MPEG muxer as well and not specific to MPEG-TS.
Jointly developed by Nico Sabbi and myself.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31929 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:48 +02:00
reimar 1e403d0593 demux_ts.c: cleanup
Remove some useless casts.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31921 b3059339-0415-0410-9bf9-f77b7e298cf2

Remove an unused variable.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31922 b3059339-0415-0410-9bf9-f77b7e298cf2

Simplify ts_sync. Might also make it easier to optimize a bit.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31923 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:48 +02:00
diego 900ca4cb3e demux_ts.c: avoid compiler warning by adding initialization
Initialize frame_length variable to zero to avoid the warning:
libmpdemux/demux_ts.c:669: warning: 'frame_length' may be used uninitialized in this function

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31874 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:46 +02:00
reimar 8362b060d4 demux_ts: Improve subtitle support
Make it use the infrastructure for subtitle handling so e.g. switching
subtitles at runtime works and add support for PGS subtitles.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31724 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:44 +02:00
reimar 29f20dc812 demux_ts: add memory access checks
Add packet->len checks to avoid out-of-bounds reads and negative
es->size values.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31671 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:43 +02:00
reimar 5c53ce6bae demux_ts: fix crash on broken packets
Check packet size before memmove to avoid crashes e.g. if we recognized the
wrong type and subtracted more header bytes than there are overall bytes.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31669 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:43 +02:00
reimar ad0be725b8 demux_ts: change IS_ macros to functions
Replace ever-growing-to-uglyness IS_* macros to by functions and
switch().

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31540 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:42 +02:00
reimar bdafaeb65c demux_ts: detect LATM AAC as a separate type
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31520 b3059339-0415-0410-9bf9-f77b7e298cf2

Place AUDIO_AAC_LATM definition next to AUDIO_AAC.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31521 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:09 +02:00
Uoti Urpala dde8b753e4 Merge svn changes r31318 to r31328
r31328 is a somewhat questionable (changing the option at that point
isn't quite safe), but it was a failure case already...
2010-06-05 23:35:42 +03:00
reimar eced1edd7e Add partial support for dirac to TS demuxer.
E.g. no header parsing is implemented so -fps must be specified manually.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31327 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-06-05 16:37:10 +00:00
Uoti Urpala 497c32cdad Merge svn changes up to r31291 2010-06-02 18:55:18 +03:00
diego def243261a Move TS_MAX_PROBE_SIZE #define to demux_ts.h instead of duplicating it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31291 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-30 22:14:13 +00:00
Uoti Urpala b3a688d45f options: move -alang and -slang to option struct
The option field corresponding to -slang is now called "sub_lang"
instead of the old misleading global name "dvdsub_lang". The code
handling -slang in subreader.c looks rather broken; disable it instead
of converting it to use the option field.
2010-05-22 10:11:15 +03:00
Uoti Urpala 00323c06e2 Delete things related to old translation system
Remove the help/ subdirectory, configure code to create toplevel
help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
2010-03-10 03:47:14 +02:00
diego b63759b175 Do not cast the results of malloc/calloc/realloc.
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
2010-02-26 15:01:37 +00:00
diego 4a9770c1c2 Add mp_getbits() to mpeg_hdr.h to avoid a forward declaration.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30621 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-17 22:58:03 +00:00
diego 6f8c91b9a2 Add separate header for mp_a52_framesize(); avoids forward declarations.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30618 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-17 22:40:50 +00:00
reimar 2e50d88ab2 If audio was identified as DTS in the PMT do not override that with TrueHD
based only on substream id.
Works with all available DTS and TrueHD samples available (2 each).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30429 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-24 20:54:17 +00:00
reimar e38bcd7d05 Use double-precision constants instead of single precision that gets cast to double.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30299 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-13 17:49:48 +00:00
cehoyos 2b3a5105ff Use double instead of float for pts.
Patch by Dan Oscarsson, Dan D Oscarsson A tieto D com 


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30298 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-12 23:03:03 +00:00
reimar ca2af2d0e7 Add support for parsing audio streams (though should be easy to extend to video)
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
2009-12-27 15:28:01 +00:00
diego f318d4c900 Add 0x85 ad ID for DTS audio.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29703 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-23 09:12:19 +00:00
reimar 2b8b5b7053 Add suport for detecting and demuxing DVB teletext streams (nothing beyond that though).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29544 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-08-21 16:54:57 +00:00
nicodvb 98742de7c1 handle TrueHD streams (they are carried in 0xFD PES streams in substream 0x72)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29457 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-07-30 08:37:10 +00:00
reimar 4f1425f256 Move printing of ID_AID_???_LANG to ts_add_stream instead of ts_detect_streams.
This makes sure it is printed only once per track and after ID_AUDIO_ID.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29381 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-06-23 09:35:20 +00:00
reimar 09f62d5aff Initialize es->lang to ensure a previous value does not get misattributed
to a different track.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29380 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-06-23 09:33:42 +00:00
reimar 44edd8a6d7 Remove duplicate printing of ID_AUDIO_ID/ID_VIDEO_ID, those are already
printed by the new_sh_... functions.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29378 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-06-21 10:55:41 +00:00
reimar e8bcaf0fca TS demuxer: make the IDs used by DEMUXER_CTRL_SWITCH_* and DEMUXER_CTRL_IDENTIFY_PROGRAM
match those printed as ID_VIDEO_ID/ID_AUDIO_ID and accepted with -vid/-aid


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29377 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-06-21 10:47:44 +00:00
diego 6e9cbdc104 whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-13 02:58:57 +00:00
diego 537d6886d5 Replace informal GPL license header by standard GPL header.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29279 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-08 21:47:50 +00:00
reimar f31339b75b Fix mp_msg call with too few arguments.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28805 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-04 08:11:42 +00:00
diego 1b915e419e Replace double semicolon by single semicolon.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28611 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-16 02:00:29 +00:00
nicodvb 39b7c1576d in parse_pat() IDENTIFY program number and pmt_pid
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28348 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-22 21:50:13 +00:00
nicodvb 480e153e2f added support for manual audio substream selection out of 0xFD PES streams (Blueray, multistream in the same pid)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28245 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-04 13:12:51 +00:00
diego 0864f92e7a Get rid of pointless 'extern' keywords.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-12-03 23:01:03 +00:00
diego 625d77f9fc Remove unused variable, fixes the warning:
libmpdemux/demux_ts.c:3130: warning: unused variable 'd_sub'


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27036 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-06-08 14:50:35 +00:00
nicodvb c4df30a358 call demux_flush() where appropriate
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26960 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-06-02 10:22:46 +00:00
diego d1ced77474 typo in filename
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26395 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-11 10:35:32 +00:00
diego 3ddde7648e Update comment to account for renamed header file.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26393 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-11 09:50:24 +00:00
reimar 42234b5198 Remove another useless cast
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26330 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-05 14:07:34 +00:00
nicodvb a6a7814471 another DCA audio identified (0x86) used in BD; patch by kirill belokurov gmail com
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26261 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-17 22:39:57 +00:00
nicodvb cec6597893 reset_fifos() resets demuxer->reference_clock to MP_NOPTS_VALUE
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26071 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-23 10:42:24 +00:00
nicodvb 98fe62b62b read the PCR of the currently playing program (if available) in demuxer->reference_clock
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26070 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-23 10:38:24 +00:00
nicodvb c19d8bdef2 when seeking in H264 an SPS *should* be a valid entry point; feel free to change it if it's wrong
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26008 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-16 11:51:41 +00:00
nicodvb fc5da18fff cosmetics
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26007 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-16 11:02:04 +00:00
nicodvb e9711acb5d in ts_detect_streams() try to identify the program found based on vpid and apid if the previous attempts failed for lack of infos
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26006 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-16 10:58:23 +00:00