Commit Graph

82 Commits

Author SHA1 Message Date
Uoti Urpala 8079f4ff82 demux, vd_ffmpeg: fix demux keyframe flag, set AV_PKT_FLAG_KEY
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.
2012-07-25 01:10:30 +03:00
Uoti Urpala fc6a9e4a3e build: switch to libavutil bswap.h and intreadwrite.h
Remove the private bswap and intreadwrite.h implementations and use
libavutil headers instead.

Originally these headers weren't publicly installed by libavutil at
all. That already changed in 2010, but the pure C bswap version in
installed headers was very inefficient. That was recently (2011-12)
improved and now using the public bswap version probably shouldn't
cause noticeable performance problems, at least if using a new enough
compiler.
2012-02-01 22:46:27 +02:00
Clément Bœsch 2174cbfa2f cleanup: silence most of the clang warnings 2011-07-09 04:23:24 +03:00
Clément Bœsch b68f9fef32 cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
reimar 851bb3ce82 demux_asf: add sanity check
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
2011-02-15 18:47:03 +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 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
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
Uoti Urpala 00323c06e2 Delete things related to old translation system
Remove the help/ subdirectory, configure code to create toplevel
help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
2010-03-10 03:47:14 +02:00
Uoti Urpala c37f09693d Merge svn changes up to r30643 2010-03-10 00:00:06 +02:00
Uoti Urpala b34a88e4f4 translations: tweak cases that relied on concatenating adjacent strings
Tweak some code parts that used to rely on string literals from
translation macros being concatenated with other adjacent string
literals. Break up the resulting string into independently translated
parts, so that the existing translations for those parts can still be
used.
2010-03-07 21:35:23 +02:00
diego 01df6700de Add header for asf_check_header, read_asf_header; avoids forward declarations.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30629 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-17 23:45:01 +00:00
diego e52d7ceb38 #include proper header for skip_audio_frame() instead of forward declaring it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30628 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-17 23:40:48 +00:00
Uoti Urpala 287b62163e Merge svn changes up to r29912 2009-11-16 07:01:46 +02:00
reimar af9c1fbda3 Remove useless cast
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29879 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-10 16:15:39 +00:00
Uoti Urpala d6c410b54c Replace libavutil internal header #includes with MPlayer copies
Change #include lines for libavutil/intreadwrite.h, libavutil/bswap.h
and libavutil/x86_cpu.h to use the MPlayer file under ffmpeg_files/
instead.
2009-07-26 06:16:43 +03:00
Uoti Urpala 0eb321bf2c Remove trailing whitespace from most files 2009-07-07 02:34:35 +03:00
Uoti Urpala 6d908205fb Merge svn changes up to r29304 2009-07-07 02:07:11 +03:00
Amar Takhar e306174952 Translation system changes part 2: replace macros by strings
Replace all MSGTR_ macros in the source by the corresponding English
string.
2009-07-07 01:38:20 +03:00
Amar Takhar b5972d6f14 Translation system changes part 1: wrap translated strings
Replace mp_msg() calls which have a translated string as the format
argument with mp_tmsg and add _() around all other translated strings.
2009-07-07 01:28:07 +03:00
diego 6e9cbdc104 whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-13 02:58:57 +00:00
diego f077569dff Add standard license header to all files in libmpdemux.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29280 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-08 21:51:13 +00:00
diego 0864f92e7a Get rid of pointless 'extern' keywords.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-12-03 23:01:03 +00:00
reimar fdcf78eec4 Do not special-case a grouping-subsegment length of 0.
Fixes samples/asf-wmv/quicktime.wmv


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27664 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-09-25 17:11:01 +00:00
reimar 4153f4e21c Avoid including avcodec.h in demuxer.h (and thus many other files) just to get
FF_INPUT_BUFFER_PADDING_SIZE.
Instead use MP_INPUT_BUFFER_PADDING_SIZE and add a preprocessor check that it
is big enough.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27314 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-17 17:14:12 +00:00
reimar 9254d010ea limits.h is required for UINT_MAX
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27305 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-16 18:51:39 +00:00
reimar 4a46fcaebc Make sure demuxed ASF packet is properly padded after descrambling
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27302 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-16 16:43:40 +00:00
reimar e870f84bfb Move duplicate FF_INPUT_BUFFER_PADDING_SIZE handling into demuxer.h
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27301 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-16 16:18:25 +00:00
reimar 3f35a38237 Do not just print a warning, also fix the len in ASF demuxer!
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27299 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-16 16:06:14 +00:00
reimar 100554a37f Replace asserts by proper conditions to allow playback of some broken but
still playable files.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27154 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-06-29 10:06:19 +00:00
eugeni 547cc5772c Check ASF packet size before calling demux_asf_read_packet. Fixes segfault
with damaged ASF files.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26644 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-02 13:33:14 +00:00
uau c9e6af5949 demux_asf: Fix operator precedence in packet length check
Change (len & 3-1) to correct ((len & 3) - 1) in packet length check.
Also change "a - 1 < b" to simpler "a <= b".


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26446 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-13 23:04:07 +00:00
diego 21c200e767 FFmpeg now uses different (unified) #include paths.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26101 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-25 15:46:36 +00:00
rtogni 74ab56cbac Check buffer index while reading to avoid sig11
Fixes bugzilla #956


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25957 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-05 21:32:37 +00:00
reimar 5960ddb8e5 Use defines to give names to the different seek flags.
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
2008-01-29 15:11:38 +00:00
reimar 35ef167321 Make all demuxer_desc_t const, thus moving them to .rodata
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25735 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-13 16:00:39 +00:00
reimar e53bba09a9 Replace LOAD_LE32 etc. by AV_RL32 etc.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25516 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-23 16:46:24 +00:00
reimar c42fa08085 Add a read_varlen function to reduce some code duplication
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25515 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-23 16:42:54 +00:00
nicodvb 6099913ed0 removed functions that were used to parse mpeg12 video (no more video); patch by John Donaghy
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23531 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-10 09:25:09 +00:00
uau 2d06dc3ce7 Calculate pts with double precision in demux_asf
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23489 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-07 09:17:10 +00:00
reimar 6a09e8e2ed Replace implicit use of fast_memcpy via macro by explicit use to allow
for future optimization.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23475 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-05 14:27:54 +00:00
zuxy e5113fdfec Set i_bps for ASF video streams according to extended stream properties
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23375 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-22 13:55:14 +00:00
uau de444acf51 Fix double free() in demux_asf.c
If demux_open_asf() fails it frees the demuxer->priv field before
returning. Then demuxer.c calls demux_close_asf() which frees the field
again. Fix by removing the free() in demux_open_asf().


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23313 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-14 01:23:54 +00:00
nicodvb e4d7bc4396 For DVR-MS:
extract timing information from the payload extension, set key frames,
detect video frame boundaries, interpolate the average video frame time
using the known informations from past frames and timestamps.
Video data before the first video key frame is thrown away.
Patch by John Donaghy johnfdonaghy gmail com



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23257 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-07 21:58:42 +00:00
diego e085bc8dcf Add explicit location for headers from the stream/ directory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22623 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-15 18:36:36 +00:00
reimar 8e374ff809 Instead of printing a useless "sig11 coming soon" message, just abort parsing
in the hope of still saving things (helps with at least
http://sam.zoy.org/zzuf/lol-mplayer.wmv).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21986 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-21 18:29:18 +00:00
gpoirier d8435fd9c6 Fix crash when attempting to seek in a streamed unseekable stream, like
mms://a632.v3306a.c3306.e.vm.akamaistream.net/7/632/3306/v1/multith.download.akamai.com/3306/2005/COMEDIE/1144-0186-001.wmv 
patch by alexandre % alex14fr A yahoo P fr %


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20808 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-08 23:54:21 +00:00
nicodvb a28d7004b4 don't set the resolution for dvr-ms files: in the asf headers it seems to
be always set incorrectly; the decoder will deal with it much better.
Patch by John Donaghy (johnfdonaghy gmail com)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20652 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-03 22:53:24 +00:00
nicodvb bd40e0ea1d interpolate real fps of dvr-ms files using the extended stream properties.
Patch by John Donaghy - johnfdonaghy gmail com


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19967 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-24 15:19:48 +00:00
uau 6723323303 Clean up audio pts handling, make audio pts tracking in the audio-only
case work the same as with video.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18713 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-06-14 19:48:54 +00:00