summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_ts.c
Commit message (Collapse)AuthorAgeFilesLines
* demux_ts: fix subtitle stream breaking audio track switchcehoyos2010-11-021-2/+3
| | | | | | | | | 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
* demux_[mpg|ts|ty]: #include dec_audio.h for skip_audio_frame()diego2010-11-021-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32431 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: malloc+memset->calloc, sizeof(TYPE)->sizeof(*ptr)reimar2010-11-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* demux: Move mp_a52_framesize from demux_ts.c to parse_es.cdiego2010-11-021-41/+0
| | | | | | | 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
* demux_ts.c: cleanupreimar2010-11-021-11/+7
| | | | | | | | | | | | | | 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
* demux_ts.c: avoid compiler warning by adding initializationdiego2010-11-021-1/+1
| | | | | | | 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
* demux_ts: Improve subtitle supportreimar2010-11-021-49/+37
| | | | | | | 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
* demux_ts: add memory access checksreimar2010-11-021-5/+5
| | | | | | | 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
* demux_ts: fix crash on broken packetsreimar2010-11-021-0/+4
| | | | | | | 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
* demux_ts: change IS_ macros to functionsreimar2010-11-021-3/+40
| | | | | | | 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
* demux_ts: detect LATM AAC as a separate typereimar2010-11-021-2/+7
| | | | | | | | 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
* Merge svn changes r31318 to r31328Uoti Urpala2010-06-051-1/+9
|\ | | | | | | | | r31328 is a somewhat questionable (changing the option at that point isn't quite safe), but it was a failure case already...
| * Add partial support for dirac to TS demuxer.reimar2010-06-051-1/+9
| | | | | | | | | | | | | | 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
* | Merge svn changes up to r31291Uoti Urpala2010-06-021-1/+0
|\|
| * Move TS_MAX_PROBE_SIZE #define to demux_ts.h instead of duplicating it.diego2010-05-301-1/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31291 b3059339-0415-0410-9bf9-f77b7e298cf2
* | options: move -alang and -slang to option structUoti Urpala2010-05-221-7/+7
| | | | | | | | | | | | | | 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.
* | Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
|/ | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* Do not cast the results of malloc/calloc/realloc.diego2010-02-261-5/+5
| | | | | | | | 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
* Add mp_getbits() to mpeg_hdr.h to avoid a forward declaration.diego2010-02-171-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30621 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add separate header for mp_a52_framesize(); avoids forward declarations.diego2010-02-171-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30618 b3059339-0415-0410-9bf9-f77b7e298cf2
* If audio was identified as DTS in the PMT do not override that with TrueHDreimar2010-01-241-1/+1
| | | | | | | | 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
* Use double-precision constants instead of single precision that gets cast to ↵reimar2010-01-131-3/+3
| | | | | | double. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30299 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use double instead of float for pts.cehoyos2010-01-121-7/+7
| | | | | | | 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
* Add support for parsing audio streams (though should be easy to extend to video)reimar2009-12-271-0/+1
| | | | | | | | | | | 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
* Add 0x85 ad ID for DTS audio.diego2009-09-231-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29703 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add suport for detecting and demuxing DVB teletext streams (nothing beyond ↵reimar2009-08-211-6/+16
| | | | | | that though). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29544 b3059339-0415-0410-9bf9-f77b7e298cf2
* handle TrueHD streams (they are carried in 0xFD PES streams in substream 0x72)nicodvb2009-07-301-1/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29457 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move printing of ID_AID_???_LANG to ts_add_stream instead of ts_detect_streams.reimar2009-06-231-2/+4
| | | | | | | 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
* Initialize es->lang to ensure a previous value does not get misattributedreimar2009-06-231-0/+1
| | | | | | | to a different track. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29380 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove duplicate printing of ID_AUDIO_ID/ID_VIDEO_ID, those are alreadyreimar2009-06-211-2/+0
| | | | | | | printed by the new_sh_... functions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29378 b3059339-0415-0410-9bf9-f77b7e298cf2
* TS demuxer: make the IDs used by DEMUXER_CTRL_SWITCH_* and ↵reimar2009-06-211-9/+4
| | | | | | | | | 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
* whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-128/+128
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace informal GPL license header by standard GPL header.diego2009-05-081-11/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29279 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix mp_msg call with too few arguments.reimar2009-03-041-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28805 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace double semicolon by single semicolon.diego2009-02-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28611 b3059339-0415-0410-9bf9-f77b7e298cf2
* in parse_pat() IDENTIFY program number and pmt_pidnicodvb2009-01-221-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28348 b3059339-0415-0410-9bf9-f77b7e298cf2
* added support for manual audio substream selection out of 0xFD PES streams ↵nicodvb2009-01-041-0/+69
| | | | | | (Blueray, multistream in the same pid) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28245 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
* Remove unused variable, fixes the warning:diego2008-06-081-1/+0
| | | | | | | 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
* call demux_flush() where appropriatenicodvb2008-06-021-6/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26960 b3059339-0415-0410-9bf9-f77b7e298cf2
* typo in filenamediego2008-04-111-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26395 b3059339-0415-0410-9bf9-f77b7e298cf2
* Update comment to account for renamed header file.diego2008-04-111-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26393 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove another useless castreimar2008-04-051-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26330 b3059339-0415-0410-9bf9-f77b7e298cf2
* another DCA audio identified (0x86) used in BD; patch by kirill belokurov ↵nicodvb2008-03-171-0/+1
| | | | | | gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26261 b3059339-0415-0410-9bf9-f77b7e298cf2
* reset_fifos() resets demuxer->reference_clock to MP_NOPTS_VALUEnicodvb2008-02-231-4/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26071 b3059339-0415-0410-9bf9-f77b7e298cf2
* read the PCR of the currently playing program (if available) in ↵nicodvb2008-02-231-3/+45
| | | | | | demuxer->reference_clock git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26070 b3059339-0415-0410-9bf9-f77b7e298cf2
* when seeking in H264 an SPS *should* be a valid entry point; feel free to ↵nicodvb2008-02-161-1/+1
| | | | | | change it if it's wrong git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26008 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmeticsnicodvb2008-02-161-4/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26007 b3059339-0415-0410-9bf9-f77b7e298cf2
* in ts_detect_streams() try to identify the program found based on vpid and ↵nicodvb2008-02-161-0/+7
| | | | | | 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
* in some still unknown system format 0x82 identifies AUDIO_DTSnicodvb2008-02-081-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25962 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
* in the PMT stream_type==0x11 indicates AAC in LATM streams, that now libfaad ↵nicodvb2008-01-261-0/+1
| | | | | | can decode; re-added git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25865 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make all demuxer_desc_t const, thus moving them to .rodatareimar2008-01-131-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25735 b3059339-0415-0410-9bf9-f77b7e298cf2
* in the PMT stream_type==0x11 identified AAC in LATM-over-LOAS syntax that ↵nicodvb2008-01-051-1/+0
| | | | | | isn't decodable yet, removed git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25599 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove useless stray #include.diego2007-12-161-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25426 b3059339-0415-0410-9bf9-f77b7e298cf2
* support for DTS as specified in DVB (untested)nicodvb2007-10-031-0/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24696 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed unused function parametersnicodvb2007-09-221-8/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24590 b3059339-0415-0410-9bf9-f77b7e298cf2
* in ts_detect_streams() moved the iteration condition inside the loopnicodvb2007-09-221-1/+4
| | | | | | | | because it depends on the updated value of stream_tell(); (fixes infinite wait on enctrypted TS streams) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24589 b3059339-0415-0410-9bf9-f77b7e298cf2
* warning fixes:diego2007-09-131-1/+1
| | | | | | | | | | | | | | | | | input.c: In function 'mp_input_set_section': input.c:1640: warning: suggest parentheses around assignment used as truth value input.c:1643: warning: suggest parentheses around assignment used as truth value mga_common.c: In function 'mga_init': mga_common.c:394: warning: suggest parentheses around assignment used as truth value playtreeparser.c: In function 'parse_smil': playtreeparser.c:523: warning: suggest parentheses around assignment used as truth value libmpdemux/demux_ts.c: In function 'ts_parse': libmpdemux/demux_ts.c:2795: warning: suggest parentheses around assignment used as truth value libmpdemux/demux_ts.c: In function 'demux_open_ts': libmpdemux/demux_ts.c:591: warning: 'frame_length' may be used uninitialized in this function git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24444 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove redundant variable declarations.diego2007-08-251-3/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24167 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix for bugzilla #835rtogni2007-07-241-1/+1
| | | | | | | | | | | | | | 1) set audio language preferences (on command line or in ~/.mplayer/config). (say, alang = Japanese[jpn],ja,jp,jpn,English[eng],en,eng,ko,ru,rus) 2) play a transport stream whose audio streams are not labeled -> no audio Patch by Sergey Svishchev >>> svs - ropnet ru <<< on bugzilla Blessed by nicodvb git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23855 b3059339-0415-0410-9bf9-f77b7e298cf2
* init ts_probe to 0 and probe up to TS_MAX_PROBE_SIZE if the parameternicodvb2007-06-091-4/+5
| | | | | | | | | is not explicitly set by the user; make the code that checks audio-only stream files respect -tsprobe git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23529 b3059339-0415-0410-9bf9-f77b7e298cf2
* added support for DTS1 audio descriptornicodvb2007-06-091-0/+4