summaryrefslogtreecommitdiffstats
path: root/libmpdemux
Commit message (Collapse)AuthorAgeFilesLines
* audio: do not run the AC-3 parser on byte-swapped AC-3reimar2011-04-131-1/+4
| | | | | | | | | Libavcodec has no parser that would work on byte-swapped AC3, but at least don't run the normal AC-3 one which would only break things. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33026 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33027 b3059339-0415-0410-9bf9-f77b7e298cf2
* codecs.conf, mp_taglists.c: add LXF PCM and dvvideocehoyos2011-04-121-0/+4
| | | | | | | | | | Support audio in Leitch/Harris' VR native stream format (LXF). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32990 b3059339-0415-0410-9bf9-f77b7e298cf2 Support dvvideo in Leitch/Harris' VR native stream format (LXF). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32991 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_lavf: disable support for byte-based seekingUoti Urpala2011-04-081-0/+4
| | | | | | | | | | | | libavformat returns nonsense per-stream bitrate values for some MPEG files (0 or many times higher than the overall bitrate of the file), which triggered the heuristic to enable byte-based seeking in demux_lavf and then made the byte-based seeks wildly inaccurate. Disable the support for byte-based seeks. This will avoid problems with files that have consistent timestamps, but on the other hand will completely break seeking in MPEG files that have timestamp resets. I'll probably add at least an option to manually enable byte-based seeking later.
* demux_mkv: support runtime video track switchingUoti Urpala2011-04-081-0/+17
| | | | | | | Add code identical to the audio case to also support switching video tracks at runtime. Patch by "Hermi".
* demux_mkv, demux_lavf: don't select initial audio trackUoti Urpala2011-04-022-36/+3
| | | | | | | | | | | | | Remove code that tries to select audio track during demuxer initialization from demux_mkv and demux_lavf. Just leave audio disabled at that point; the higher-level select_audio() function will call the demuxer to switch track later anyway. Removing this unneeded code also fixes use of these demuxers as the main demuxer with -audiofile. Before the automatic track selection would have enabled an audio track (if the file had any); as the main demuxer was not used for audio the unused packets from this enabled track would accumulate until they reached queue size limits.
* demux_mkv: fix uninitialized variableUoti Urpala2011-04-021-1/+1
| | | | | | Commit de42015a97cf296aad6307 ("demux_mkv: read tags") added code that failed to initialize a loop variable. Fix. No visible problems caused by the bug have been reported.
* demux_mkv: support Blu-ray subtitlesUoti Urpala2011-03-312-0/+3
| | | | Recognize "S_HDMV/PGS" CodecID.
* demux_mkv: simplify subtitle type recognitionUoti Urpala2011-03-312-20/+8
| | | | | Remove indirection through MATROSKA_SUBTYPE_* and instead set the per-track type field to the letter identifier used in public sh_sub.
* demux_mkv: use generic packet handling code for subtitlesUoti Urpala2011-03-311-27/+5
| | | | | | | | Duration may now be set for packet types other than subtitles; as far as I can tell nothing should care. A check requiring valid duration values for subtitles is removed, because duration may not be properly set for all bitmap subtitle types; hopefully this doesn't make the behavior with (already broken) subtitles without duration worse.
* demux_mkv: support E-AC-3 audioUoti Urpala2011-03-312-0/+4
| | | | Recognize "A_EAC3" CodecID.
* demux_lavf: fix initial "-vid"-based video selectionUoti Urpala2011-03-311-1/+2
| | | | | | In 59058b54a73809866476b243d8bee82174fb4de8 (from svn r31129) Aurelien changed demux_lavf -vid indexing, but failed to change the initial video stream selection based on -vid to match. Fix.
* demux_lavf: fix stream switch returned index for no sound/videoUoti Urpala2011-03-311-12/+8
| | | | | | | | If the argument given to demux_lavf audio/video switch code is not one of -2, -1, or valid audio/video ID the code will treat it the same as -2 (switch to no sound / no video). However the returned index was not set to -2 in this case. Fix. Also change the returned index from -1 to -2 when staying at no sound / video.
* core, demux: fix video index handling in stream switchingUoti Urpala2011-03-311-5/+9
| | | | | | | | Fix bugs in the handling of stream index values in video stream switching. This is similar to what commit 90bedd0b872b6eea02351aafb62e did for audio. Also clean up the corresponding audio code a little bit.
* demux_ty: disable -subcc functionality (demux_ty_osd)Uoti Urpala2011-03-242-0/+8
| | | | | | | | Disable compilation of demux_ty_osd.c because of its GPL v2-only license. This only affects TiVo files with -subcc. After this no v2-only code should get compiled (yuv4mpeg_intern.h has a v2-only license, but the contents of the header look like they're not copyrightable).
* 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
* cleanup: remove some casts of memalign() return valuediego2011-02-151-4/+4
| | | | | | | Do not pointlessly cast the return value of memalign(). memalign() returns void*, which is compatible with any pointer in C. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32850 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_asf: add sanity checkreimar2011-02-151-0/+4
| | | | | | Check that rlen is valid before using it to increment a pointer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32832 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix compilation with old FFmpeg versionsUoti Urpala2011-02-081-1/+1
| | | | | | | | | | | | af_lavcac3enc: use old SampleFormat names without AV_ prefix, the latter were only added in 2010-11 vd_ffmpeg: add ifdef around CODEC_ID_LAGARITH use demux_real: use ffmpeg_files/intreadwrite.h stream/http.c, stream/realrtsp/real.c: define AV_BASE64_SIZE macro for old libavutil versions lacking it
* libmpdemux/mf.c: Don't hardcode filename lengthranma2011-01-311-2/+3
| | | | | | | | | Use limits.h to get the maximum length instead of hardcoding it. Original patch by Sang-Uok Kum. Signed-off-by: Tobias Diedrich <ranma@google.com> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32766 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge branch 'sub'Uoti Urpala2011-01-2610-84/+53
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sub: sub/OSD: move some related files to sub/ subtitles: options: enable -ass by default subtitles: change default libass rendering style demux_mkv, chapters: change millisecond arithmetic to ns cleanup: rename ass_* functions to mp_ass_* subs: use correct font aspect ratio for libass + converted subs cleanup: some random minor code simplification and cleanup vf_vo: fix EOSD change detection bug sd_ass: remove subreader use, support plaintext markup subtitles: style support for common SubRip tags and MicroDVD core: ordered chapters: fix bad subtitle parameter subs/demux: don't try to enable sub track when creating it subtitles/demux: store duration instead of endpts in demux packets subtitles: add framework for subtitle decoders options: add special -leak-report option subtitles: remove code trying to handle text subs with libavcodec cleanup: move MP_NOPTS_VALUE definition to mpcommon.h subtitles: move global ass_track to struct osd_state core: move most mpcommon.c contents to mplayer.c core: move global "subdata" and "vo_sub_last" to mpctx subtitles: remove sub_last_pts hack options: move -noconfig to option struct, simplify
| * sub/OSD: move some related files to sub/Uoti Urpala2011-01-267-13/+9
| |
| * demux_mkv, chapters: change millisecond arithmetic to nsUoti Urpala2011-01-263-39/+35
| | | | | | | | | | | | | | | | | | | | | | | | demux_mkv kept various integer timestamps in millisecond units. Matroska timestamp arithmetic is however specified in nanoseconds (even though files typically use 1 ms precision), and using ms units instead of that only made things more complex. Based on the demux_mkv example the general demuxer-level chapter structure also used ms units. Change the demux_mkv arithmetic and demuxer chapter structures to use nanoseconds instead. This also fixes a seeking problem in demux_mkv with files using a TimecodeScale other than the usual 1000000 (confusion between ms and TimecodeScale*ns units).
| * subs/demux: don't try to enable sub track when creating itUoti Urpala2011-01-181-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | demuxer.c new_sh_sub_sid() tried to immediately select the created sub track for playback if its id matched the "-sid" option value. This was buggy, as more initialization is needed to properly enable subtitles. Normally the correct track to play is selected after the demuxer has been created. It's possible that some DVD use case or such depended on the removed code to make -sid work with a subtitle track that's not found at start and only added later (vobsubs probably would start playing without separate initialization); if so then that needs to be fixed later in a different way.
| * subtitles/demux: store duration instead of endpts in demux packetsUoti Urpala2011-01-183-5/+5
| |
| * subtitles: add framework for subtitle decodersUoti Urpala2011-01-182-21/+4
| | | | | | | | | | | | | | | | | | | | Add a framework for subtitle decoder modules that work more like audio/video decoders do, and change libass rendering of demuxed subtitles to use the new framework. The old subtitle code is messy, with details specific to handling particular subtitle types spread over high-level code. This should make it easier to clean things up and fix some bugs/limitations.
| * cleanup: move MP_NOPTS_VALUE definition to mpcommon.hUoti Urpala2011-01-151-3/+1
| |
* | demux_ty: fix "seek to negative position" warningUoti Urpala2011-01-211-0/+1
| | | | | | | | | | | | | | | | | | demux_ty relied on demuxer->filepos being initially set to 0, but demuxer.c has been changed to initialize it to -1. This caused a "Invalid seek to negative position!" error message when running the demux_ty file format check (so it occurred for any file which had not been recognized as another type before that). Fix by making demux_ty initialize filepos to 0.
* | demux_lavf: reject format probe matches with low scoreUoti Urpala2011-01-211-1/+1
| | | | | | | | | | | | | | | | When trying to determine the format of an input stream, demux_lavf retries the probe with a larger buffer size up to some limit if the match score is low, but when reaching the size limit it accepted the best match (if any) regardless of its score. Change it to require a score of at least AVPROBE_SCORE_MAX/4 to accept a match at all.
* | demux: add sanity checks to packet allocation functionsUoti Urpala2011-01-172-11/+26
| | | | | | | | | | | | | | | | | | | | Change new_demux_packet() and resize_demux_packet() length parameter type from int to size_t and add a check to abort() if the size is over 1 GB. This should make integer overflow problems leading to memory corruption in demuxers less likely; and aborting should be no worse than insane memory consumption. Also make the functions abort() if the actual allocation fails instead of trying to continue with a zero-sized buffer.
* | cleanup: move demux packet functions from demuxer.h to demuxer.cUoti Urpala2011-01-172-61/+67
|/ | | | | There's no reason why the demux packet functions would need to be inlined, so move them from the header to the .c file.
* cosmetics: remove unused code, small formatting tweaksUoti Urpala2010-12-201-62/+1
|
* demux_mkv: remove old code for -nocorrect-pts supportUoti Urpala2010-12-201-131/+0
| | | | | There should be no reason for anyone to use demux_mkv in -nocorrect-pts mode any more, so delete the code used for that.
* demux_mkv: fix seeks to before the first index entryUoti Urpala2010-12-201-19/+16
| | | | | | | Make seeks backward from a time before the first index entry go to the first entry instead of failing completely. This change doesn't affect behavior for most files, because seeks are clamped to 0 from below and normally files have the first index entry at 0.
* demux_asf: Add a missing free to ASF demuxer closereimar2010-12-161-0/+1
| | | | | | Fixes bug #1238. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32711 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_mov: fix possible hang on invalid inputreimar2010-12-161-1/+1
| | | | | | | len < 8 is also invalid for 64-bit codec chunk size. Previous code could cause hang. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32708 b3059339-0415-0410-9bf9-f77b7e298cf2
* aviheader.c: avoid using uninitialized data in an error casereimar2010-12-161-1/+3
| | | | | | Avoid using uninitialized data if index read does not return enough data. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32707 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_mov: fix some memory allocation handlingreimar2010-12-161-5/+13
| | | | | | | | Always free before overwriting a pointer with a newly allocated one, always use calloc instead of realloc when the previous data is not needed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32703 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_gif: Fix memleaks on errorreimar2010-12-161-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32701 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
* mp3_hdr.h: fix mp_check_mp3_header()reimar2010-12-161-3/+4
| | | | | | | | | | | Fix mp_check_mp3_header: it checked for a byte-swapped MP3-header on little-endian, and on big-endian it would only accept a MP3-header that would be valid when read in both directions. The latter was the reason for bug 905, causing the PS demuxer to claim files far too agressively (the MP3 check avoiding misdetection as DV is not exactly a sane approach, but it mostly works). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32692 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_demuxers: Fix crash with -audiofile and audio disabledreimar2010-12-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32691 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_asf, asfheader.c: cleanupreimar2010-12-162-6/+3
| | | | | | | | | | | | | | | | | | Move setup of sh_audio->format to a more appropriate place (in asfheader.c). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32684 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove pointless assignments that are already handled in new_sh_audio. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32685 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove useless assignment already done in new_sh_video. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32686 b3059339-0415-0410-9bf9-f77b7e298cf2 Use FFMAX for slightly better readability. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32687 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_real: fix some unaligned writesreimar2010-12-161-7/+8
| | | | | | | Fix some unaligned writes and avoid some (incorrect due to alignment) casts. Might also fix bug #371. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32683 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_audio: Do not generate nonsensical pts values for FLACreimar2010-12-161-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32678 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_audio: Set needs_parsing to 1 for DTS audioreimar2010-12-161-1/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32668 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
* mp_taglists.c: add tag for svq3compn2010-12-161-0/+1
| | | | | | | | Fixes: ffmpeg://rtsp://stream.diffusion.ens.fr/2008_10_03_albarede.mov and other X-SV3V-ES rtsp streams opened with ffmpeg:// git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32660 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_lavf: Add support for uncompressed BGR24 pixfmtreimar2010-12-161-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32659 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: make some arguments const, "unsigned char"->uint8_treimar2010-12-163-3/+3
| | | | | | | | | | | | | | | | | | Mark input-only buffers as const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32652 b3059339-0415-0410-9bf9-f77b7e298cf2 Use uint8_t type instead of unsigned char. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32653 b3059339-0415-0410-9bf9-f77b7e298cf2 Mark input buffer that is never modified as const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32654 b3059339-0415-0410-9bf9-f77b7e298cf2 Mark input-only buffer as const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32655 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_avi: Add WAVEFORMATEXTENSIBLE supportreimar2010-12-162-1/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32639 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_audio: fix WAVEFORMATEXTENSIBLE supportreimar2010-12-161-2/+2
| | | | | | | | | | Fix WAVEFORMATEXTENSIBLE support on big-endian. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32637 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix WAVEFORMATEXTENSIBLE condition. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32638 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
* audio: FLAC: support new libavcodec parser, use lavf to demuxUoti Urpala2010-12-093-1/+9
| | | | | Parse FLAC data with new libavcodec parser if needed. Use libavformat demuxer for raw FLAC files by default.
* demux_mkv, ad_ffmpeg: use Matroska OutputSamplingFrequency if available