summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_ts.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-121-3537/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tis drops the silly lib prefixes, and attempts to organize the tree in a more logical way. Make the top-level directory less cluttered as well. Renames the following directories: libaf -> audio/filter libao2 -> audio/out libvo -> video/out libmpdemux -> demux Split libmpcodecs: vf* -> video/filter vd*, dec_video.* -> video/decode mp_image*, img_format*, ... -> video/ ad*, dec_audio.* -> audio/decode libaf/format.* is moved to audio/ - this is similar to how mp_image.* is located in video/. Move most top-level .c/.h files to core. (talloc.c/.h is left on top- level, because it's external.) Park some of the more annoying files in compat/. Some of these are relicts from the time mplayer used ffmpeg internals. sub/ is not split, because it's too much of a mess (subtitle code is mixed with OSD display and rendering). Maybe the organization of core is not ideal: it mixes playback core (like mplayer.c) and utility helpers (like bstr.c/h). Should the need arise, the playback core will be moved somewhere else, while core contains all helper and common code.
* demux_ts: remove some incorrect usages of realloc_structreimar2012-10-311-19/+16
| | | | | | Remove some incorrect usages of realloc_struct. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35318 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_ts: fix reading teletext languagereimar2012-10-301-1/+1
| | | | | | | Fix reading language from teletext descriptor when it is not the first descriptor in the block. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35198 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_ts: cosmeticsreimar2012-10-301-10/+10
| | | | | | | | | | Remove "inline" from functions that are definitely not absolutely critical for performance. The compiler should be able to make a more intelligent decision on its own. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35197 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_ts: add support for PCM variant found on BluRayreimar2012-10-301-0/+7
| | | | | | TS demuxer: Add support for PCM variant found on BluRay. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35106 b3059339-0415-0410-9bf9-f77b7e298cf2
* libmpdemux: add back demux_tswm42012-09-181-0/+3533
| | | | | | | | | | | | | | | | | Someone wanted this. Apparently both libavformat's TS demuxer and demux_ts are crap, and work/fail in different cases. This demuxer has been removed in 1fde09db6f4ce. All code added comes from the revision before that. Some required bits have been added in the commit before this one (re-adding demux_mpg), in particular the changes to video.c. stream_dvb will use this demuxer by default, otherwise demux_lavf is preferred (as it has been before). Some TS related command line options are not re-added. Closed captions might not work.
* Remove some demuxers and decoderswm42012-07-301-3533/+0
| | | | | | | | | | | | | | | | | | Most of these demuxers and decoders are provided in better form by libav, while the mplayer builtin ones are essentially unmaintained. The only legimitate use case for not using the libav ones was working around libav bugs or bugs related to the way mplayer uses libav. Instead of trying to keep dead code alive, development effort should go into improving libav or the mplayer libav glue code. Note that the libav demuxer have been preferred over the mplayer builtin ones for a while in mplayer2. There were some exceptions: playing DVDs with dvdnav or playing network sources. (That's because some stream modules and network.c requested explicit file formats, such as DEMUXER_TYPE_MPEG_PS, which mapped to builtin demuxers.) With this commit, they are switched to use libav. One caveat is that the requested format is not passed to libavformat, instead we rely on the auto probing to select the correct libav demuxer (see code in demux_open_stream()).
* demux, vd_ffmpeg: fix demux keyframe flag, set AV_PKT_FLAG_KEYUoti Urpala2012-07-251-1/+1
| | | | | | | | | | | | | | | | | | There was some confusion about the "flags" field in demuxer packets. Demuxers set it to either 1 or 0x10 to indicate a keyframe (and the field was not used to indicate anything else). This didn't cause visible problems because nothing read the value. Replace the "flags" field with a boolean "keyframe" field. Set AV_PKT_FLAG_KEY based on this field in packets fed to libavcodec video decoders (looks like PNG and ZeroCodec are the only ones which depend on values from demuxer; previously this was hardcoded to true for PNG). Make demux_mf set the keyframe field in every packet. This matters for PNG files now that the demuxer flag is forwarded to libavcodec. Fix logic setting the field in demux_mkv. It had probably not been updated when adding SimpleBlock support. This probably makes no difference for any current practical use.
* cleanup: silence most of the clang warningsClément Bœsch2011-07-091-2/+2
|
* 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-291-2/+1
| | | | | | | | | | | | 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
* cleanup: shut up more warningsClément Bœsch2011-05-061-2/+2
|
* Merge branch 'mplayer1_changes'Uoti Urpala2011-05-021-1/+1
|\
| * 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
* | options: change -alang and -slang to use string list typeClément Bœsch2011-04-201-1/+1
|/ | | | | | | | | 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.
* demux_ts: change DVB SPU format for libavcodecreimar2011-02-151-3/+4
| | | | | | | | Change DVB SPU stream format in TS demuxer so it can be decoded by libavcodec (as soon as lavc is fixed not to fail just because of an extra padding byte). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32866 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_ts: DVB and PGS subtitle fixesreimar2011-02-151-6/+5
| | | | | | | | Fix r32587: the previous approach to return subtitles in time broke DVB subtitles due to returning incomplete packets and even for PGS subtitles resulted in incorrect pts values for the sub packets. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32864 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_ts: Set subtitle stream type correctly for DVB subtitlesreimar2011-02-151-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32862 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_ts: change overlapping memcpy to memmovereimar2010-12-161-1/+1
| | | | | | | Replace memcpy with memmove since at least src==dst is possible. Fixes another issue that is part of bug #1280. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32697 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_ts: fix several memleaksreimar2010-12-161-1/+17
| | | | | | Fixes bug 1280. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32696 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_ts: cleanupreimar2010-12-161-5/+4
| | | | | | | | | | | Replace malloc+memset with calloc and use sizeof(*variable). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32694 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace hard-coded number for loop limits for array index by the define used in the array declaration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32695 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_ts: avoid using unitialized datareimar2010-12-161-0/+1
| | | | | | Add memset to avoid using uninitialized data with sample in bug 1280. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32693 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux-ts: fix TS files with MP4 ES AAC descriptorreimar2010-12-161-1/+7
| | | | | | | | | Fix TS files with MP4 ES AAC descriptor to be correctly recognized as AAC and not AAC in LATM. This fixes playback of http://samples.mplayerhq.hu/A-codecs/AAC/freetv_aac_latm.ts, actual LATM samples seem unaffected. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32667 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_ts: fix -sb when -aid stream is not foundreimar2010-12-161-1/+3
| | | | | | | | Make it seek back to the stream->start_pos position instead of 0 in that case. Fixes bug 1790. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32635 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: remove NULL checks before free() all over the codecboesch2010-11-141-8/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_ts: Fix subtitle sync issuesreimar2010-11-081-0/+5
| | | | | | | 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
* 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_