Commit Graph

3823 Commits

Author SHA1 Message Date
Uoti Urpala e990fb2ffe subtitles: add framework for subtitle decoders
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.
2011-01-18 14:58:09 +02:00
Uoti Urpala 757e43c3f8 demux: add sanity checks to packet allocation functions
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.
2011-01-17 16:16:39 +02:00
Uoti Urpala e342a81d6f cleanup: move demux packet functions from demuxer.h to demuxer.c
There's no reason why the demux packet functions would need to be
inlined, so move them from the header to the .c file.
2011-01-17 15:47:57 +02:00
Uoti Urpala e9022ec470 cleanup: move MP_NOPTS_VALUE definition to mpcommon.h 2011-01-15 18:45:43 +02:00
Uoti Urpala 4a26b4c024 cosmetics: remove unused code, small formatting tweaks 2010-12-20 06:42:04 +02:00
Uoti Urpala 1cf4802c1d demux_mkv: remove old code for -nocorrect-pts support
There should be no reason for anyone to use demux_mkv in
-nocorrect-pts mode any more, so delete the code used for that.
2010-12-20 03:14:43 +02:00
Uoti Urpala 042ab4feb5 demux_mkv: fix seeks to before the first index entry
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.
2010-12-20 02:26:10 +02:00
reimar 14059eca7a demux_asf: Add a missing free to ASF demuxer close
Fixes bug #1238.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32711 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 06:24:25 +02:00
reimar 21367beef1 demux_mov: fix possible hang on invalid input
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
2010-12-16 06:22:19 +02:00
reimar 7e24b8edb4 aviheader.c: avoid using uninitialized data in an error case
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
2010-12-16 06:22:19 +02:00
reimar fbd28ae939 demux_mov: fix some memory allocation handling
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
2010-12-16 06:22:19 +02:00
reimar 7ed3291a4f demux_gif: Fix memleaks on error
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32701 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 06:22:19 +02:00
reimar 7ab2c7bc15 demux_ts: change overlapping memcpy to memmove
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
2010-12-16 06:22:19 +02:00
reimar ccd5c8566f demux_ts: fix several memleaks
Fixes bug 1280.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32696 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 06:22:19 +02:00
reimar b4c2cd422e demux_ts: cleanup
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
2010-12-16 06:22:19 +02:00
reimar 68c262c6c4 demux_ts: avoid using unitialized data
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
2010-12-16 06:22:19 +02:00
reimar 3474d7e1b5 mp3_hdr.h: fix mp_check_mp3_header()
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
2010-12-16 06:22:19 +02:00
reimar 2b2929fc93 demux_demuxers: Fix crash with -audiofile and audio disabled
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32691 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 06:22:19 +02:00
reimar de8ec24998 demux_asf, asfheader.c: cleanup
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
2010-12-16 06:22:18 +02:00
reimar 9a7ed638a6 demux_real: fix some unaligned writes
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
2010-12-16 06:22:18 +02:00
reimar 41270c50cf demux_audio: Do not generate nonsensical pts values for FLAC
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32678 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 05:28:28 +02:00
reimar 51830c3bff demux_audio: Set needs_parsing to 1 for DTS audio
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32668 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 05:11:08 +02:00
reimar 831395e79b demux-ts: fix TS files with MP4 ES AAC descriptor
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
2010-12-16 05:10:18 +02:00
compn 0f1ca625de mp_taglists.c: add tag for svq3
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
2010-12-16 04:59:11 +02:00
reimar a17ab46ef3 demux_lavf: Add support for uncompressed BGR24 pixfmt
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32659 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 04:58:42 +02:00
reimar e23bf53fad cosmetics: make some arguments const, "unsigned char"->uint8_t
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
2010-12-16 04:57:18 +02:00
reimar 5e6c4de69e demux_avi: Add WAVEFORMATEXTENSIBLE support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32639 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 04:23:53 +02:00
reimar 9ffc22923e demux_audio: fix WAVEFORMATEXTENSIBLE support
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
2010-12-16 04:20:24 +02:00
reimar da15a4de00 demux_ts: fix -sb when -aid stream is not found
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
2010-12-16 04:14:01 +02:00
Uoti Urpala cc2d748b73 audio: FLAC: support new libavcodec parser, use lavf to demux
Parse FLAC data with new libavcodec parser if needed. Use libavformat
demuxer for raw FLAC files by default.
2010-12-09 02:50:17 +02:00
Uoti Urpala 37dbe7f5d0 demux_mkv, ad_ffmpeg: use Matroska OutputSamplingFrequency if available
Use the value of the OutputSamplingFrequency element instead of the
SamplingFrequency element as the "container samplerate". In most cases
this only removes a warning, as those typically differ for SBR AAC
files and there was already a special case detecting this in
ad_ffmpeg.

The implementation adds a new "container_out_samplerate" field to the
sh_audio struct. Reusing the existing "samplerate" field and the
equivalent inside the 'wf' struct and just setting those to the new
value instead would probably work (at least I'm not aware of any codec
that would need the original SamplingFrequency for initialization).
However using a separate field also avoids some ugliness: the 'wf'
struct may not exist (though most demuxers create it), and the
'samplerate' field is overwritten to reflect the final value decided
by codec when decoding is first initialized.
2010-11-21 14:52:08 +02:00
Uoti Urpala 5a3edf4c07 TOOLS/matroska.py: recognize 3 more elements
Add definitions for DisplayUnit, OutputSamplingFrequency and
FileDescription in matroska.py. Regenerate the C template files to
allow using all current definitions in code.
2010-11-21 14:20:38 +02:00
Uoti Urpala dcaad783b0 demux_lavf: fix check for files lavf doesn't recognize
Commit 91ea30c585 ("demux_lavf: use lavf for all formats except those
listed") broke handling of files whose type libavformat couldn't
recognize at all. Fix the demux_lavf probe function to correctly
return failure in that case.
2010-11-17 21:47:56 +02:00
Uoti Urpala b82f82fe08 demux: fix initial subtitle track selection
Commit 3c2cfee488 ("demux: improve -alang / -slang track choosing
logic") had a copy/paste error which left the subtitle code using
audio variables and broke initial subtitle track selection. Fix.

I actually realized soon after creating the original commit that I'd
forgotten to change the variables and went back to fix it, but then
somehow thought that it was already OK and didn't change it...
2010-11-16 10:49:23 +02:00
Uoti Urpala 721803c631 demux_mkv: seek: fix bogus audio packet from earlier position
Due to a bug created back in 2006 when SimpleBlock support was added,
demux_mkv demuxed one audio packet from the initial file position
after a seek, then skipped the following ones until a video keyframe
was found. This wasn't very noticeable earlier, but it had bad effects
after the recently added -initial-audio-sync code as the extra packet
with an earlier timestamp confused timing calculations and resulted in
desync after seeking. Fix.
2010-11-15 18:18:21 +02:00
Uoti Urpala 0478f1a29f demux_mkv: fix minor seek problem
Commit fc66c94360 ("demux_mkv: seek: with no track-specific index
entries use any") used uint64_t for a variable that should have been
int64_t. Fix. The practical effects of this error were minor; mainly
it made the player unnecessarily read the file contents between the
previous index entry and the correct one when seeking.
2010-11-15 17:54:09 +02:00
cboesch fe3c4810e1 cleanup: remove NULL checks before free() all over the code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-14 13:11:20 +02:00
reimar b492561241 demux_avi: remove pointless checks
If audio_block_size is 0 that is a bug (and will result in a division by 0
in one case that does not check this), thus remove all checks for it.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32623 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-14 12:52:33 +02:00
reimar 74377fbfbf demux_avi: modify to avoid -aid problem in svn
[ Note: the questionable changes in svn that triggered this problem
were never included in git, and so this commit is not strictly
necessary here. It's included to reduce the differences between git
and svn demux_avi versions. ]

Fix possible division by 0 if -aid is used for AVI files.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32622 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-14 12:40:33 +02:00
Uoti Urpala fdea095e34 demux_lavf: mark AVI timestamps non-pts to avoid messages
Playing AVI files containing B-frames with demux_lavf printed two
"decreasing pts" info messages at the start of the file. We know the
timestamps from AVI won't be valid pts, so add a demuxer field to
convey that information to the timing code and make that not even try
to use the timestamps as valid pts.
2010-11-14 11:59:55 +02:00
Anton Khirnov 91ea30c585 demux_lavf: use lavf for all formats except those listed
lavf demuxers are mostly better and receive more maintenance,
therefore it makes sense to prefer them in most cases. Change the
"preferred" logic from listing all formats for which lavf is preferred
to listing exceptions for which it isn't. Currently there are 3
exceptions: Matroska, FLAC and RealMedia (.rm).
2010-11-13 22:02:26 +02:00
Uoti Urpala 642ce15ef7 core: give pts as parameter to demuxer_get_current_chapter()
demuxer_get_current_chapter() accessed sh_video/sh_audio pts fields to
determine playback position. demux layer shouldn't access those and
the values used weren't quite correct anyway. Give the playback
position as a parameter to the demux layer function instead. Also
change the top-level get_current_chapter() to use get_current_time()
in the timeline case where it didn't refer to demux layer.
2010-11-13 16:48:31 +02:00
Uoti Urpala 1a336d6616 demux_nsv: don't write to sh_video->pts 2010-11-13 15:34:02 +02:00
Clément Bœsch e7d3e63a3f options: move -cache-min and cache-seek-min to option struct 2010-11-11 17:53:44 +02:00
Clément Bœsch 449484179f options: move [no]hr-mp3-seek to option struct 2010-11-11 17:51:03 +02:00
Clément Bœsch 6526bee39b options: move some demux options to option struct
Following options were moved: audiofile, audiofile-cache, subfile,
demuxer, audio-demuxer, sub-demuxer, [no]extbased.
2010-11-11 16:31:46 +02:00
Uoti Urpala 523a48d8a9 demux: change "%s file format detected" message
"libavformat file format detected" wasn't a very useful message due to
the many file formats supported to libavformat. Change the message so
that for demux_lavf it says something like
"Detected file format: QuickTime/MPEG-4/Motion JPEG 2000 format (libavformat)"
(using long name from FFmpeg), and for non-lavf something like
"Detected file format: Matroska".
2010-11-10 15:38:36 +02:00
Uoti Urpala b98821de7c demuxer.c: clean up demux_open_stream()
Refactor the code to avoid duplication. Behavior should be mostly the
same as before.
2010-11-10 15:34:13 +02:00
Uoti Urpala 7b076f79a9 demux: error out if given invalid -demuxer option
The code choosing the demuxer to use only printed an error if given an
unknown demuxer name, then continued with default demuxer selection.
Change it to abort instead. This feels like more sensible behavior.
Also there's no fallback to autodetection in the case where the
demuxer name is recognized but the demuxer fails to open the file
either.
2010-11-10 09:49:39 +02:00
Uoti Urpala 8fb91511b1 demux_lavf: add simple seek-by-bytes mode for MPEG
Seeking in MPEG files with pts resets could fail completely, as it was
always done by timestamps and those of course don't unambiguously
specify a file position in such files. Add basic functionality for
byte-based seeking and playback position reporting, and decide whether
to use that functionality based on a simple heuristic (could be
improved).
2010-11-10 07:26:39 +02:00
Uoti Urpala 3c2cfee488 demux: improve -alang / -slang track choosing logic
When -alang / -slang was specified the numerically first matching
track (if any) was always chosen. This meant that specifying "-alang
eng" could change the track choice even if all tracks were in English,
because now the default flag of tracks was ignored. Change the logic
to take the default flag into account as a secondary sorting key.

The code also accepted prefix matches, so that "-slang g" would match
track language "ger". I think that was not intentional. Change it to
require exact matches.
2010-11-08 18:05:12 +02:00
Uoti Urpala fc66c94360 demux_mkv: seek: with no track-specific index entries use any
The Cue entries in typical Matroska files have information for the
video track only. This caused seeks to fail when playing with
-novideo, as demux_mkv tried to use audio track index entries then.
Add a fallback case that uses any index entries without caring what
track they're for if there are no entries specific to the track we're
interested in.
2010-11-08 18:05:12 +02:00
Uoti Urpala 0619b75cb1 demux_mkv: fix relative seeks without index
Relative seeks didn't add the current position as they should. Fix.

Note that this had no effect in normal playback case even if the file
had no index, because the "accurate_seek" logic at higher level would
convert all commands to absolute seeks before calling demuxer level.
2010-11-08 18:05:12 +02:00
Uoti Urpala 5c3aaf03b1 demux_mkv: fix seek hang when going past end of file without index 2010-11-08 18:05:12 +02:00
Uoti Urpala 4de3f19426 demux_mkv: cleanup: separate index creation part of seeking
Move the code to build an index and seek without using cue information
from the file to a separate function.
2010-11-08 18:05:12 +02:00
Uoti Urpala a7b91626cf core: use correct demuxer with -audiofile / -subfile
Various code referred to "mpctx->demuxer" where it should really have
referred to the one used for audio/subtitles in case those differ. Fix
by using "mpctx->d_audio->demuxer" etc instead. Disable the copying of
streams in demux_demuxers; that was a partial workaround for things
referring to the main demuxer (and it wasn't enough anyway).

This fixes, among other things, switching audio tracks within the file
specified by -audiofile.
2010-11-08 18:05:12 +02:00
Uoti Urpala 82cd2f7aec demux_demuxers: initialize stream_pts to MP_NOPTS_VALUE
demux_demuxers doesn't run the normal demuxer.c initialization for new
demuxers. Initialize stream_pts separately (it won't ever be changed
with the current implementation). This at least avoids other code
assuming it was set properly.
2010-11-08 18:05:12 +02:00
Uoti Urpala 9a663ffec6 core: move video pos/length query functions from demux to core
Move functions to query current playback position, percentage position
and total video length from from the demuxer layer to top level. The
functions need access to playback state that doesn't belong on the
demuxing level. Make the new functions more capable and simplify some
code that can now rely on them. This fixes some errors in displayed in
OSD and slave mode information when using timeline (ordered chapters).
2010-11-08 18:05:12 +02:00
Uoti Urpala 3628a903f4 demux: fix -correct-pts autoselection with -audiofile
Make demuxer-based -correct-pts autoselection base the decision on the
video demuxer in case several are being used, such as with
-audiofile.
2010-11-08 18:05:12 +02:00
cehoyos 458350350b demuxer.c: add missing parser list fourccs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32596 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:05:12 +02:00
cehoyos 9bb304898b demuxer.c: fix parser list fourcc typo: 'MPE '->'MP3 '
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32595 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:05:11 +02:00
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
reimar 50d5197611 codecs_conf, mp_taglists: Use only one fourcc for LATM
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32584 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:05:07 +02:00
reimar e666e3ce91 demuxer.c: Add support for parsing LATM
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32582 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:03:35 +02:00
reimar 8d89878e7f demux_lavf: Fix program switching
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32580 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:03:35 +02:00
reimar eb4db3a9ff demux_lavf: Print PROGRAM_ID -identify output similar to demux_ts
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32579 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:03:35 +02:00
cehoyos 0a2d29a75b codecs.conf, mp_taglists: Support FFmpeg LATM decoding
Also move libfaad codecs.conf entry into the same position as in svn
(no functionality change since ffaac is marked buggy so only faad is
used by default regardless or order).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32571 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:03:27 +02:00
Uoti Urpala 759231566a demux_lavf: for avi, use packet .dts instead of .pts
When playing avi files take timestamps from the .dts field of the
packet instead of .pts. For avi libavformat returns the original avi
timestamps in .dts; without GENPTS set .pts is sometimes unset, with
GENPTS set it'll contain some made up values which are not correct
pts. Current libavformat also has a bug take makes it loop over the
whole avi file if you use GENPTS with video streams disabled.

The timing code can cope with the avi timestamps even though they're
not really pts.
2010-11-06 23:29:45 +02:00
Uoti Urpala b04c615959 demux_lavf: avoid deprecated "first_iformat" by using newer API 2010-11-06 23:29:07 +02:00
Uoti Urpala 393bb7bb98 demux_lavf: add hack for stream-changing ogg input (internet radio)
Some internet radio streams are ogg/vorbis with a new stream for each
track (and the previous stream stops receiving data). Add a hack to
ignore the stream number in packets when input seems to match this
case; all packets will be effectively regarded as parts of the same
audio stream. This workaround can't work perfectly with current lavf
because it will keep adding streams and then hit its 20 stream
maximum; at that point playback will likely fail. Print a warning
about this problem and mention "-demuxer ogg" as a possible
workaround.

Currently there's no check that the vorbis extradata is actually
compatible between the streams.
2010-11-06 23:29:00 +02:00
Uoti Urpala 661d909f8e demux_lavf: more future proof AVInputFormat name comparison
AVInputFormat name fields consist of comma-separated components, more
of which may be added in backwards-compatible versions. demux_lavf did
a strcmp against the whole field at once; this would break if a
component was added. Change the code to search for individual
component matches within the field instead.
2010-11-06 23:26:21 +02:00
diego ed8e92afcc Remove #warning preprocessor directives
The #warning preprocessor directive is non-standard and not available with all
compilers. Furthermore, the warnings it causes are noisy and have not led to
getting any of the underlying issues fixed in the space of a decade.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32480 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:10 +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
reimar c310aa4628 demux_lavf: handle new streams appearing during playback
Based on patch by KS Ng - dmbth [hk.dmbth gmail com]

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32439 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:08 +02:00
diego 7acaf6db39 demux_pva: move functions, add "static"
Mark pva_get_payload() as static, it is not used outside of the file.

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

Move pva_get_payload() around to avoid a forward declaration.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32436 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:08 +02:00
diego 342c68283e mpeg_hdr.c: move function to avoid forward declaration
Move mp_unescape03 function around to avoid forward declaration.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32433 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:08 +02:00
diego 03dae530f8 demux_real.c: Remove unused hexdump() forward declaration
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32432 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 044fc491fa demux_mkv: fix decoded length calculation of LZO decompression
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32305 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:17:04 +02:00
Uoti Urpala 7aa202d9a7 demux_mkv: add some sanity checks
Add some checks to prevent bad files from creating arbitrarily large
buffer blocks (which could result in integer overflows and memory
corruption). Remove a test with little use from demux_mkv_decode(); it
compared an int with size_t, and was useless on 64-bit platforms at
least.
2010-11-02 04:17:04 +02:00
Uoti Urpala c5e462b33d build: enable/disable all FFmpeg libraries together
Enable all of libavcodec, libavformat, libswscale, and libpostproc
together (libavutil is always required).

based on svn commit by diego:

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32226 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:16:55 +02:00
Uoti Urpala 389c32b5c7 Remove MEncoder
Disable MEncoder compilation and remove files used by MEncoder
only. There's no attempt to remove all references to MEncoder from the
build system, documentation etc at this point.

Removed files: (muxers, audio/video encoders, misc)

mencoder.c
cfg-mencoder.h
parser-mecmd.[ch]
xvid_vbr.[ch]
libmpdemux/muxer*
libmpcodecs/ae*
libmpcodecs/ve*
libmpcodecs/native/rtjpegn.[ch]
libmpcodecs/native/mmx.h   // was used by rtjpegn only

Rationale:

MEncoder is still useful for some people, but there's not much
potential for further development; in the long run almost all use
cases can be handled better by solutions based on something else (for
example using FFmpeg or encoding MPlayer output). FFmpeg is already
getting video filtering support which should work for some common
MEncoder uses.

Keeping MEncoder working takes extra work that is away from player
development. While that amount of work is not huge (mostly MEncoder
can be just ignored), it's not completely insignificant either.

MEncoder is still maintained to some degree in the svn tree, so if
necessary it's possible to use it from there for now. This tree has
never had major improvements for the MEncoder side, so using svn
MEncoder instead should be no major loss.
2010-11-02 04:16:55 +02:00
reimar 5896036cb3 demux_nemesi: Remove a pointless if
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32208 b3059339-0415-0410-9bf9-f77b7e298cf2

Reindent.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32209 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:16:46 +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 44f851a3ed demux_rtp: Remove pointless typedef keyword
Remove "typedef" from struct RTPState declaration; fixes:
libmpdemux/demux_rtp.cpp:90: warning: 'typedef' was ignored in this declaration

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32170 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:16:46 +02:00
diego f2899d96ee Add central init_avcodec() to avoid duplicated libavcodec init code
Patch by Vlad Seryakov, vseryakov gmail com

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

Refactor more instances of avcodec_initialized handling into init_avcodec().
This is a leftover from the previous commit.

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

Add missing #include for vd_ffmpeg.h; fixes the warning:
libmpcodecs/vf_zrmjpeg.c:472: warning: implicit declaration of function 'init_avcodec'

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32176 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:51 +02:00
reimar dec2db6326 demux_lavf: Always use convergence_duration for subtitles
Otherwise subtitles will stay on screen forever for ASS subtitles in
mkv if no ASS renderer is used.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32032 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:49 +02:00
reimar 415b948f2e demuxer.c: reset subtitle EOF on seeking
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32031 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:49 +02:00
reimar 0e82595632 demux_lavf: print subtitle type in more cases
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32006 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:49 +02:00
diego 15fee47bc6 demux_ogg.c: remove unused variable
Avoid redundant use of variable 'size' in demux_ogg_read_packet(), fixes:
libmpdemux/demux_ogg.c:266: warning: unused variable 'size'

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31946 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:48 +02:00
diego 26541aeb8b printf format fixes ("%d" -> "%zd")
Add 'z' length modifier to %d printf format specifier for size_t argument.
stream/http.c:675: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'

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

Add 'z' length modifier to %d printf format specifiers for size_t arguments.
libmpdemux/demux_avi.c:553: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'
libmpdemux/demux_avi.c:553: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t'

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

Add 'z' length modifier to %d printf format specifiers for size_t arguments.
libmpdemux/demux_lmlm4.c:75: warning: format '%d' expects type 'int', but argument 5 has type 'ssize_t'
libmpdemux/demux_lmlm4.c:163: warning: format '%d' expects type 'int', but argument 6 has type 'ssize_t'
libmpdemux/demux_lmlm4.c:163: warning: format '%d' expects type 'int', but argument 7 has type 'ssize_t'

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

Add 'z' length modifier to %d printf format specifier for size_t argument.
stream/asf_streaming.c:676: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31938 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:48 +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
siretart 2e6ff523dd spelling fixes
Found by the Debian QA tool 'lintian'

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

reintroduce typo in genres.h that was fixed fixed r31913 to match the id3v2 spec

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31920 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:03 +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
diego 578ad534b3 configure: Rename "network" variable and option to "networking"
This avoids conflicts with the FFmpeg variable of the same name.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31749 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:44 +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
Uoti Urpala 7d17b5e254 demuxer.c: add new_sh_sub_sid_lang
Allocates a new sh_sub and specifies language at the same time. I
don't think this is a particularly good API but add it for easier
compatibility with some svn changes.
2010-11-02 04:14:44 +02:00
reimar 9e537d1f6e subs: Add support for DVB and XSUB subtitles, not yet working properly
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31694 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:43 +02:00
reimar ce19a13986 asfheader, demux_audio: Remove some pointless be2me/le2me
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31685 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:43 +02:00
reimar 5f65cbcc07 demux_pva.c: Remove completely nonsensical le2me usages
The only effect these had was breaking playback on big-endian.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31682 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:43 +02:00
reimar 01a95808f1 aviheader.c: Remove obfuscating use of le2me_32.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31681 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:43 +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 96c17fe68b subs: Add support for PGS subtitle decoding via libavcodec
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31665 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:43 +02:00
aurel d7a9c6d240 demux_lavf: stricter check for convergence_duration validity
Avoid using meaningless values

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31642 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:20 +02:00
reimar fc95b0d5f3 asfguid.h: Use AV_RL32 also in x86
It is well enough optimized nowadays.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31610 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:20 +02:00
reimar 2308e045de cleanup: Add const qualifiers for struct ad_functions pointers
The ad_functions structs are in rodata, mark some pointers to them
const.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31606 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:13:02 +02:00
reimar 815460d289 demux_lavf: Avoid a crash if stream->url is not set
Print a warning since this is not supposed to happen.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31587 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:43 +02:00
diego a1b8092c87 Factorize MPlayer/MEncoder version string handling.
The string now resides in a central object file instead of
being duplicated in every file that requires a version string.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31577 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11: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
diego 1ba2cadb83 demux_real: use MKTAG definition from libavutil
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31531 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
reimar 1b078bc2c5 demux_y4m: increase error message verbosity from MSGL_V to MSGL_ERR
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31464 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
reimar 531964aa8d demux_ty: Cleanup some code, possibly fix vstream support (untested)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31423 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:10:10 +02:00
diego a7bc7d8e63 cleanup: #include loader/wine/winbase.h instead of local declarations
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31414 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:07:44 +02:00
cehoyos 8de983fe7f rtsp: Support RTSP/RTP over HTTP via LIVE555
Patch by Malte Särner, malte D sarner A multiq se

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

Fix compilation with nemesi and live555.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31348 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:07:16 +02:00
reimar c1b0498c1f demuxer.c: Make ds_get_next_pts work for the first packet of a stream
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31338 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-10-27 20:30:30 +03:00
reimar 786b5e4352 demux_real: Don't try to read index if stream is not seekable
Fixes playback of piped real files (except multirate where this seems
not possible).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31335 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-10-27 20:23:46 +03:00
Uoti Urpala d9e3281608 demux_mkv: support V_MJPEG video tag 2010-10-27 01:46:05 +03:00
Uoti Urpala dd61521a6e demux_mkv: accept files with no doctype in EBML header
Assume files which start with an EBML header but have no DocType
element in that header have type "matroska", and attempt to play
them. Reportedly some mkvmerge versions create such files.
2010-10-21 22:58:51 +03: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
reimar 29b2cae621 Also print current stream position in mp_read debug output.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31326 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-06-05 16:14:56 +00:00
reimar 1581d9deb2 Remove explicit eof check for mp_read code, stream code handles this case
better, e.g. properly supporting growing files.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31325 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-06-05 16:12:36 +00:00
reimar 159f5f451d Di not do a stream_reset on seeking backwards, the seek itself should
do whatever is best/necessary, this method will just drop cached data.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31324 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-06-05 16:00:49 +00:00
reimar e41db02518 Default to -correct-pts off if -fps was given, since -fps has no effect
(and doesn't really make sense) with correct-pts mode.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31316 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-06-04 17:11:56 +00:00
reimar 637edc7a27 Try always enabling correct pts again for lavf demuxer, since the know
issue with PAFF seems solved to me, and disabled correct-pts causes
flickering with -ass (which of course should be fixed as well though).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31313 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-06-03 21:01:37 +00:00
Uoti Urpala 7c4dbb8a20 demux_mkv: enable automatic index generation by default
Change demux_mkv to behave by default as it did with -idx before. The
index generation code in demux_mkv linearly scans the file up to the
seek timestamp (it doesn't read the whole file up front like some
other demuxers do). Doing that is probably a better default for files
with no index than rejecting the seek request and asking user to
specify -idx.
2010-06-02 19:30:40 +03:00
Uoti Urpala 497c32cdad Merge svn changes up to r31291 2010-06-02 18:55:18 +03:00
aurel 9be39d0640 Switch mkv demuxing to lavf by default.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31294 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-31 19:44:02 +00:00
Uoti Urpala 2fcd4cf73e demux_mkv: fix possible seek crash
Commit fc39d48465 ("demux_mkv: store streams sequentially in
demuxer->[avs]_streams") had a copy-paste error causing it to look up
a video ID where it should have been an audio one. The most likely
visible symptom was a segfault when seeking while playing a
high-numbered audio track. Looks like I was careless with that
original commit, second bug in the same one...
2010-05-31 21:50:17 +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 d75206ce68 demux_mkv: support VP8 video tag 2010-05-30 17:21:59 +03:00
Uoti Urpala 9a2224ac0f demux_mkv: support WebM files
Accept files with doctype "webm" in addition to "matroska".
2010-05-30 17:15:22 +03:00
Uoti Urpala 8ce2c41ca5 Merge svn changes up to r31226 2010-05-30 16:25:04 +03:00
Uoti Urpala 6f199ab3d9 Merge svn changes up to r31169 2010-05-30 15:27:58 +03:00
diego 5007aa845f Cast void* pointer to appropriate type before using it in an addition; fixes
libmpdemux/demux_mkv.c:1873: warning: pointer of type 'void *' used in arithmetic


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31276 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-29 22:22:07 +00:00
Uoti Urpala 1888e57af7 cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf"
Change 'struct vf_instance' pointer arguments to more standard style
as in the subject. Also some other minor formatting fixes.

Patch by Diego Biurrun.
2010-05-29 17:20:44 +03:00
diego c0262f7435 Drop pointless _t suffix from 'struct lavf_priv'.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31247 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-28 00:25:28 +00:00
diego 5796e96b36 Drop pointless _s suffix from 'struct af_stream'.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31238 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-27 20:59:40 +00:00
diego 52b364075b cosmetics: Reformat in K&R coding style.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31234 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-27 16:46:47 +00:00
diego 16a226da45 Remove two pointless void* casts.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31233 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-27 16:13:53 +00:00
diego 8350f5430a Remove unnecessary demux_mkv_seek() forward declaration.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31232 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-27 16:05:30 +00:00
diego b17704e6a8 cosmetics: Drop pointless _s suffix from 'struct ad_functions'.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31231 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-27 10:10:27 +00:00
reimar 1e0b9a97fd Switch ogg demuxing to lavf by default.
This has the side-effect of using fftheora by default instead of
theora, which possibly should be changed.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31225 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-26 18:01:38 +00:00
Uoti Urpala aa07b6d578 demux_mkv: fix realvideo extradata handling
The code handling larger-than-minimum realvideo extradata sizes was
complete nonsense. It tried to add the additional data to the exported
track extradata by reading data from the input stream, which was
completely bogus as this code is called long after the original
Matroska track extradata information has been read. As a result the
data read had nothing to do with correct values, and the read call
messed up the stream position which likely broke further parsing of
the file and caused complete playback failure. Change the code to
instead copy any additional part at the end of input extradata to the
end of output extradata. I believe this is the intended semantics,
though I haven't verified it from any specs.
2010-05-26 08:32:40 +03:00
hyc 3c1cedaa56 Add support for STREAM_CTRL_SEEK_TO_TIME in ffmpeg streams
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31218 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-25 23:07:28 +00:00
Uoti Urpala 07e4261aa2 demux_mkv: fix crash bug introduced by recent change
Commit fc39d48465 ("demux_mkv: store streams sequentially in
demuxer->[avs]_streams") had a simple bug in automatic stream
selection causing a crash if no video or audio track was marked as
'default'. Fix.
2010-05-24 08:01:04 +03:00
Uoti Urpala 9b94b3fb30 demux_mkv: support switching to/from -nosound
Allow audio stream switching to turn off sound or enable it, and also
include nosound as one of the values cycled through when stepping to
the next audio stream.
2010-05-22 10:38:55 +03:00