Commit Graph

9414 Commits

Author SHA1 Message Date
Martin Storsjö
5d95112d92 movenc: Reorder entries in the MOVIentry struct, for tigheter packing
Originally, sizeof(struct MOVIentry) was 48, after the reordering,
it is 40 in my build configuration.

When writing really long mov/mp4 files, this can make a difference
- this saves a bit over 2 MB of memory per hour of video (down to
10.3 MB per hour from 12.3 MB per hour initially) for a video with
75 packets per second - 25 fps + 50 audio packets (which is the
case for AMR audio).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-21 01:12:58 +02:00
Martin Storsjö
1f712e6a05 rtsp: Remove extern declarations for variables that don't exist
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-21 01:12:07 +02:00
Martin Storsjö
23e57d167a Add a tool that uses avio to read and write, doing a plain copy of data
It also optionally can throttle its operation to a particular
speed, to simulate realtime writing.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-20 22:19:09 +02:00
Janne Grunau
59297ad63d lavf: force single-threaded decoding in avformat_find_stream_info
The H.264 decoder needs SPS and PPS for initialization during
multi-threaded decoding. When probed single-threaded SPS and PPS are
copied to extradata and are available for proper initialization of
the decoder before the first frame is decoded.
2012-01-20 09:41:46 +01:00
Dustin Brody
b89f8774f2 avidec: migrate last of lavf from FF_ER_* to AV_EF_*
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-20 09:30:09 +01:00
ami_stuff
ef9623f670 Add "S263" FourCC
fixes ticket #923

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-19 17:20:50 +01:00
Michael Niedermayer
c130428ab5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avprobe, cmdutils: K&R formatting cosmetics
  tests: K&R formatting cosmetics for test programs
  lavf: free packets for muxers implementing interleave_packet().
  lavf: fix and extend av_interleaved_write_frame() doxy.
  mov: Remove dead stores for spherical coordinates for channel position.
  error_resilience: K&R formatting cosmetics
  RELEASE_NOTES: mention hiding private symbols in shared builds.
  RELEASE_NOTES: mention some notable API changes in 0.8

Conflicts:
	cmdutils.h
	doc/RELEASE_NOTES
	ffprobe.c
	libavcodec/error_resilience.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-19 01:19:38 +01:00
Anton Khirnov
aa2e4bb058 lavf: free packets for muxers implementing interleave_packet().
Fixes a memleak.
2012-01-18 20:10:26 +01:00
Anton Khirnov
f97cb45156 lavf: fix and extend av_interleaved_write_frame() doxy.
Specify that lavf is responsible for freeing the data.
2012-01-18 20:08:13 +01:00
Alex Converse
d7420e0ac9 mov: Remove dead stores for spherical coordinates for channel position. 2012-01-18 10:54:25 -08:00
Dmitry Volyntsev
4259d1eb99 fix rtp 916 issue, patch 2
Reviewed-by: Luca Abeni <lucabe72@email.it>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-18 16:37:00 +01:00
Dmitry Volyntsev
b29ec002bb fix rtp 916 issue
Reviewed-by: Luca Abeni <lucabe72@email.it>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-18 16:36:38 +01:00
Tomas Härdin
1de5154dfb mxfdec: Consider OPAtom files that don't have exactly one EC to be OP1a
This fixes demuxing of 2011_DCPTEST_24FPS.V.mxf.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-17 20:55:19 +01:00
Michael Niedermayer
67f5650a78 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rv34: add NEON rv34_idct_add
  rv34: 1-pass inter MB reconstruction
  add SMJPEG muxer
  avformat: split out common SMJPEG code
  pictordec: Use bytestream2 functions
  avconv: use avcodec_encode_audio2()
  pcmenc: use AVCodec.encode2()
  avcodec: bump minor version and add APIChanges for the new audio encoding API
  avcodec: Add avcodec_encode_audio2() as replacement for avcodec_encode_audio()
  avcodec: add a public function, avcodec_fill_audio_frame().
  rv34: Intra 16x16 handling
  rv34: Inter/intra MB code split

Conflicts:
	Changelog
	libavcodec/avcodec.h
	libavcodec/pictordec.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/x86/rv34dsp.asm
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-17 02:37:30 +01:00
Reimar Döffinger
203f94fd7c mxfdec: Add missing free.
Should fix valgrind FATE.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-16 19:21:24 +01:00
Reimar Döffinger
6003ec880b asfdec: Move variable declarations into the blocks they are used in.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-16 19:21:24 +01:00
Paul B Mahol
ffa0923eee add SMJPEG muxer
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-01-16 11:29:55 +01:00
Paul B Mahol
68b94f8bc3 avformat: split out common SMJPEG code
This is a preparation for adding SMJPEG muxer.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-01-16 11:29:55 +01:00
Panagiotis H.M. Issaris
811de351ea Enhance HLS seeking.
Enhances seeking by demuxing until the requested timestamp is reached within
the segment selected by the seek code using the playlist info.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-16 03:43:32 +01:00
Jean First
fa169d5650 mov: cosmetics - move a line to a better position and add a comment
mov: cosmetics - move a line to a better position and add a comment

Oana Andreea Stratulat submitted a similar patch to trac, but forgot
to notify the ML about it.

Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-16 03:27:01 +01:00
Jean First
60168f9319 movenc: add FIXME to add alis and rsrc atoms
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-16 03:25:30 +01:00
Jean First
0c10885c39 movenc: indent cosemtics
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-16 03:17:39 +01:00
Michael Niedermayer
4a4c4278b7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: split ADPCM and DPCM test references into separate files.
  mov, mxfdec: Employ more meaningful return values.
  lavc: Relax API strictness in avcodec_decode_audio3 with a custom get_buffer()
  wavpack: fix clipping for 32-bit lossy mode
  vb: Use bytestream2 functions

Conflicts:
	libavcodec/utils.c
	libavcodec/vb.c
	libavformat/mxfdec.c
	tests/fate/dpcm.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-16 01:33:35 +01:00
Daniel Huang
bcd5d979aa mov, mxfdec: Employ more meaningful return values.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-01-15 22:00:11 +01:00
Reimar Döffinger
ea3abcd58f Fix ff_get_guid for short reads or errors.
Current code would just return uninitialized data with no way
to detect this condition.
Instead, fill the whole GUID with 0 in that case.
Fixes valgrind uninitialized data errors in fate-seek-lavf_asf.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-15 20:37:54 +01:00
Michael Niedermayer
52889b543d mpeg12dec: BW10 support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-14 19:25:15 +01:00
Michael Niedermayer
b26f0ee39f avidec: XMPG support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-14 19:25:08 +01:00
Laurent BRULET
45c39e566f udp: fix segfault on closing
Fixes ticket915
2012-01-14 17:14:18 +01:00
Oana Stratulat
a63a86fd6f Fixes issue 890: OOM with zmbv file
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-14 07:19:27 +01:00
Peter Ross
3a1df393b8 ico: favour BITMAPHEADER dimensions over IconEntry dimensions
Fixes ticket 759.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-13 15:57:34 +01:00
Nicolas Noirbent
62a22b2865 segment: fix FPE when segment_list_size is 0
With the added benefit that allowing -segment_list_size 0 makes it
possible to keep all segment entries in the list file.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-13 15:57:34 +01:00
Michael Niedermayer
645569e19f Revert "riff: remove references to sonic codec ids"
This reverts commit 0fd88d3988.

Theres no reason to drop support for this.
2012-01-13 15:57:34 +01:00
Stefano Sabatini
0be8e66174 mpegtsenc: do not reference the deprecated ffmpeg option 'vbsf' in a log message
Give a more generic advice.
2012-01-13 15:51:30 +01:00
Stefano Sabatini
3fcf841ff5 mpegtsenc: fix some typos: aac -> AAC, adts -> ADTS 2012-01-13 15:51:06 +01:00
Stefano Sabatini
9a7f2aa958 mpegtsenc: use more meaningful error codes 2012-01-13 15:50:54 +01:00
Michael Niedermayer
b18e17eabf Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
  utils: Check for extradata size overflows.
  ARM: rv34: fix asm syntax in dc transform functions
  avio: Fix the value of the deprecated URL_FLAG_NONBLOCK
  rv34: fix and optimise frame dependency checking
  rv34: NEON optimised dc only inverse transform
  avprobe: use avio_size() instead of deprecated AVFormatContext.file_size.
  ffmenc: remove references to deprecated AVFormatContext.timestamp.
  lavf: undeprecate read_seek().
  avserver: remove code using deprecated CODEC_CAP_PARSE_ONLY.
  lavc: replace some remaining FF_I_TYPE with AV_PICTURE_TYPE_I
  lavc: ifdef out parse_only AVOption
  nellymoserdec: SAMPLE_FMT -> AV_SAMPLE_FMT
  mpegvideo_enc: ifdef out/replace references to deprecated codec flags.
  riff: remove references to sonic codec ids
  indeo4: add some missing static and const qualifiers
  rv34: DC-only inverse transform
  avconv: use AVFrame.width/height/format instead of corresponding AVCodecContext fields
  lavfi: move version macros to a new installed header version.h
  vsrc_buffer: release the buffer on uninit.
  rgb2rgb: rgb12tobgr12()
  ...

Conflicts:
	avconv.c
	doc/APIchanges
	ffprobe.c
	libavfilter/Makefile
	libavfilter/avfilter.h
	libswscale/rgb2rgb.c
	libswscale/rgb2rgb.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-13 01:29:48 +01:00
Alex Converse
4df30f7114 utils: Check for extradata size overflows. 2012-01-12 13:26:13 -08:00
Martin Storsjö
6b9e4eea83 avio: Fix the value of the deprecated URL_FLAG_NONBLOCK
This isn't used in practice anywhere within libav at the moment,
but change it for consistency until it is removed.
URL_RDONLY/WRONLY were fixed in commit 5b81e29593 (after the
values that actually were used were changed at the major bump,
in commit cbea3ac8), but this flag was unintentionally left unfixed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-12 22:07:10 +02:00
Reimar Döffinger
742b660eb7 wtvdec: fix a few memleaks as show by valgrind with the FATE test.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-12 20:09:16 +01:00
Anton Khirnov
44bcab5883 ffmenc: remove references to deprecated AVFormatContext.timestamp. 2012-01-12 18:18:23 +01:00
Anton Khirnov
e5c708151e lavf: undeprecate read_seek().
The "new seeking API" was never finished and nobody is working on it.
2012-01-12 18:18:23 +01:00
Anton Khirnov
0fd88d3988 riff: remove references to sonic codec ids
They are deprecated and will be purged on next major bump.
2012-01-12 18:18:22 +01:00
Peter Ross
051257495a ico: reject icon entries that are smaller than sizeof(BITMAPHEADER)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-12 16:32:55 +01:00
Peter Ross
90dbd08127 ico: ignore IconEntry.bpp value, and favour BITMAPHEADER.NumColors value over that in IconEntry
Fixes ticket 905.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-12 16:32:55 +01:00
Peter Ross
bd3a12d68d ico: consider IconEntry.NumColors of 255 to be ambiguous
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-12 16:32:55 +01:00
Michael Niedermayer
794006f8fe Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fft: init functions with INIT_XMM/YMM.
  pcmenc: set frame_size to 0.
  gsm demuxer: use generic seeking instead of a gsm-specific function.
  gsm demuxer: return packets with only 1 gsm block at a time.
  avcodec: add GSM parser
  doc: Replace ffmpeg references in avserver config file by avconv.
  doc: Fix names of av_log color environment variables.
  Fix a bunch of platform name and other typos.
  Add some missing changelog entries and release 0.8_beta2
  No longer build libpostproc by default
  wtv: fix memleaks during normal operation
  threads: add CODEC_CAP_AUTO_THREADS for libvpx and xavs

Conflicts:
	Changelog
	RELEASE
	cmdutils.c
	configure
	doc/ffserver.conf
	doc/platform.texi
	ffplay.c
	libavcodec/Makefile
	libavcodec/version.h
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-12 01:10:32 +01:00
Justin Ruggles
f01f6a8474 gsm demuxer: use generic seeking instead of a gsm-specific function.
Since packets all contain only a single block, the generic seek function can
be used while still maintaining block-accuracy.
2012-01-11 08:56:24 -05:00
Justin Ruggles
467879eb54 gsm demuxer: return packets with only 1 gsm block at a time.
fixes stream copy of raw gsm to mov.
tested with QuickTime.
2012-01-11 08:56:24 -05:00
Oana Stratulat
550f7c43ec Fixes wrong duration in .mov file. Issue 599
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-11 05:17:47 +01:00
Michael Niedermayer
0e7fc3cafe Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  rv34: frame-level multi-threading
  mpegvideo: claim ownership of referenced pictures
  aacsbr: prevent out of bounds memcpy().
  ipmovie: fix pts for CODEC_ID_INTERPLAY_DPCM
  sierravmd: fix audio pts
  bethsoftvideo: Use bytestream2 functions to prevent buffer overreads.
  bmpenc: support for PIX_FMT_RGB444
  swscale: fix crash in fast_bilinear code when compiled with -mred-zone.
  swscale: specify register type.
  rv34: use get_bits_left()
  avconv: reinitialize the filtergraph on resolution change.
  vsrc_buffer: error on changing frame parameters.
  avconv: fix -copyinkf.
  fate: Update file checksums after the mov muxer change in a78dbada55
  movenc: Don't store a nonzero creation time if nothing was set by the caller
  bmpdec: support for rgb444 with bitfields compression
  rgb2rgb: allow conversion for <15 bpp
  doc: fix stray reference to FFmpeg
  v4l2: use C99 struct initializer
  v4l2: poll the file descriptor
  ...

Conflicts:
	avconv.c
	libavcodec/aacsbr.c
	libavcodec/bethsoftvideo.c
	libavcodec/kmvc.c
	libavdevice/v4l2.c
	libavfilter/vsrc_buffer.c
	libswscale/swscale_unscaled.c
	libswscale/x86/input.asm
	tests/ref/acodec/alac
	tests/ref/acodec/pcm_s16be
	tests/ref/acodec/pcm_s24be
	tests/ref/acodec/pcm_s32be
	tests/ref/acodec/pcm_s8
	tests/ref/lavf/mov
	tests/ref/vsynth1/dnxhd_1080i
	tests/ref/vsynth1/mpeg4
	tests/ref/vsynth1/qtrle
	tests/ref/vsynth1/svq1
	tests/ref/vsynth2/dnxhd_1080i
	tests/ref/vsynth2/mpeg4
	tests/ref/vsynth2/qtrle
	tests/ref/vsynth2/svq1

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-11 02:44:43 +01:00
Janne Grunau
68e252f548 wtv: fix memleaks during normal operation 2012-01-11 01:34:30 +01:00
Justin Ruggles
4556ebfb7d ipmovie: fix pts for CODEC_ID_INTERPLAY_DPCM
frame sample count calculation was incorrect
2012-01-10 14:25:07 -05:00
Justin Ruggles
e9626eb32e sierravmd: fix audio pts
The duration of the first packet was being calculated incorrectly, leading to
an incorrect timestamp offset.
2012-01-10 14:24:08 -05:00
Martin Storsjö
a78dbada55 movenc: Don't store a nonzero creation time if nothing was set by the caller
If the creation time is stored in the file as a zero, the
mov demuxer skips exporting the creation time. Currently,
files muxed without a creation time get demuxed with a
Jan 1st 1970 creation timestamp.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-10 16:02:07 +02:00
Reimar Döffinger
efd6b80b40 rawdec: use av_shrink_packet.
This fixes reads of uninitialized data by the parser when running
FATE sample h264-conformance/SL1_SVA_B.264.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-09 11:02:21 +01:00
Michael Niedermayer
72c5828c93 lavf: Add forgotten line from 212fd3a1f1
This fixes a tiny memleak.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-09 01:12:48 +01:00
Michael Niedermayer
52ef95474b ipmovie: Fix passing resolution changes on.
Fixes Ticket676

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-08 20:26:39 +01:00
Michael Niedermayer
757473831c Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  cabac: Move code only used within the CABAC test program into the test program.
  vp56: Drop unnecessary cabac.h #include.
  h264-test: Initialize AVCodecContext.av_class.
  build: Skip compiling network.h and rtsp.h if networking is not enabled.
  cosmetics: drop some pointless parentheses
  Disable annoying warning without changing behavior
  faq: Solutions for common problems with sample paths when running FATE.
  avcodec: attempt to clarify the CODEC_CAP_DELAY documentation
  avcodec: fix avcodec_encode_audio() documentation.
  FATE: xmv-demux test; exercise the XMV demuxer without decoding the perceptual codecs inside.
  vqf: recognize more metadata chunks
  FATE test: BMV demuxer and associated video and audio decoders.
  FATE: indeo4 video decoder test.
  FATE: update xxan-wc4 test to a sample with more code coverage.
  Change the recent h264_mp4toannexb bitstream filter test to output to an elementary stream rather than a program stream.
  g722enc: validate AVCodecContext.trellis
  g722enc: set frame_size, and also handle an odd number of input samples
  g722enc: split encoding into separate functions for trellis vs. no trellis
  mpegaudiodec: Use clearer pointer math
  tta: Fix returned error code at EOF
  ...

Conflicts:
	libavcodec/h264.c
	libavcodec/indeo3.c
	libavcodec/interplayvideo.c
	libavcodec/ivi_common.c
	libavcodec/libxvidff.c
	libavcodec/mpegvideo.c
	libavcodec/ppc/mpegvideo_altivec.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavfilter/vsrc_buffer.c
	libavformat/Makefile
	tests/fate/indeo.mak
	tests/ref/acodec/g722

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-08 03:34:22 +01:00
Diego Biurrun
52877251cf build: Skip compiling network.h and rtsp.h if networking is not enabled.
rtsp.h relies on network.h and the latter conditionally defines fallback OS
structures that rely on configure tests, which are only run if networking
is enabled.
2012-01-07 22:13:08 +01:00
Diego Biurrun
3dc99a18d4 cosmetics: drop some pointless parentheses 2012-01-07 22:13:07 +01:00
Michael Niedermayer
c8e309c2a6 lavf: Do not attempt to use frame multi threading when probing.
This fixes various problems with getting stream info. For example playback of the
file of Ticket88. Multithreaded find_stream_info should be reenabled
once it works correctly
This partly reverts 212fd3a1f1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-07 20:51:20 +01:00
Paul B Mahol
49a2aebc00 vqf: recognize more metadata chunks
Do not create tags for non-char chunks.
Create readable tag for DSIZ chunk.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-07 11:14:57 -08:00
Michael Niedermayer
4b4acc544f tta: Fix returned error code at EOF
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-07 09:59:15 -05:00
Michael Niedermayer
d8b33a9989 tta: fix off be 1 error in the end detection.
Fixes use of uninitialized values.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-07 09:59:09 -05:00
Paul B Mahol
75146b8828 ipmovie: Add param change side data if the video dimensions have changed
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-07 15:25:41 +02:00
Carl Eugen Hoyos
ee884c3023 Fix OOM error condition in idcin demuxer. 2012-01-07 13:14:34 +01:00
Michael Niedermayer
6a56f4e634 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flicvideo: fix invalid reads
  vorbis: Avoid some out-of-bounds reads
  vqf: add more known extensions
  cabac: remove unused function renorm_cabac_decoder
  h264: Only use symbols from the SVQ3 decoder under proper conditionals.
  add bytestream2_tell() and bytestream2_seek() functions
  parsers: initialize MpegEncContext.slice_context_count to 1
  spdifenc: use special alignment for DTS-HD length_code

Conflicts:
	libavcodec/flicvideo.c
	libavcodec/h264.c
	libavcodec/mpeg4video_parser.c
	libavcodec/vorbis.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-07 02:30:27 +01:00
Janne Grunau
73b16198b6 electronicarts: check bytes per sample for validity
Prevents division by zero.
2012-01-07 00:18:42 +01:00
Michael Niedermayer
877f6eb5fb tta: Fix returned error code at EOF
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-07 00:08:36 +01:00
Michael Niedermayer
4925b6e784 tta: fix off be 1 error in the end detection.
Fixes use of uninitialized values.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-07 00:08:36 +01:00
Reimar Döffinger
4dfb74cd4f Flush decoders correctly in avformat_find_stream_info().
The decoders should not only be flushed on EOF or error, but also when
e.g. probe size was reached.
It is best to just always flush by default and only disable it
explicitly when we know that we have everything we need.
Fixes trac ticket #879.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-06 19:00:33 +01:00
Paul B Mahol
f86209b43d vqf: add more known extensions
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-06 09:24:40 -08:00
Michael Niedermayer
3edff185ab Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
  ipmovie: do not read audio packets before the codec is known
  truemotion2: check size before GetBitContext initialisation
  avio: Only do implicit network initialization for network protocols
  avio: Add an URLProtocol flag for indicating that a protocol uses network
  adpcm: ADPCM Electronic Arts has always two channels
  matroskadec: Fix a bug where a pointer was cached to an array that might later move due to a realloc()
  fate: Add missing reference file from 9b4767e4.
  mov: Support MOV_CH_LAYOUT_USE_DESCRIPTIONS for labeled descriptions.
  4xm: Prevent buffer overreads.
  mjpegdec: parse RSTn to prevent skipping other data in mjpeg_decode_scan
  vp3: add fate test for non-zero last coefficient
  vp3: fix streams with non-zero last coefficient
  swscale: remove unused U/V arguments from yuv2rgb_write().
  timer: K&R formatting cosmetics
  lavf: cosmetics, reformat av_read_frame().
  lavf: refactor av_read_frame() to make it easier to understand.
  Report an error if pitch_lag is zero in AMR-NB decoder.
  Revert "4xm: Prevent buffer overreads."
  4xm: Prevent buffer overreads.
  4xm: pass the correct remaining buffer size to decode_i2_frame().
  ...

Conflicts:
	libavcodec/4xm.c
	libavcodec/mjpegdec.c
	libavcodec/truemotion2.c
	libavformat/ipmovie.c
	libavformat/mov_chan.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-06 02:45:12 +01:00
Anssi Hannula
580bb77936 spdifenc: use special alignment for DTS-HD length_code
Align IEC 61937 length_code for DTS-HD so that
(length_code & 0xf) == 0x8. This is reportedly needed with some
receivers.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-05 16:27:07 -08:00
Janne Grunau
f5be84cfbc ipmovie: do not read audio packets before the codec is known
Prevents a division by zero.
2012-01-05 23:19:14 +01:00
Martin Storsjö
acb074301c avio: Only do implicit network initialization for network protocols
The implicit network initialization is set to be removed in the
future, but is kept for compatibility. By not doing the implicit
initialization for non-network protocols, we avoid the warning
about avformat_network_init() not being called for these, where
it really doesn't make much sense.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-05 23:56:56 +02:00
Martin Storsjö
32b83aeec1 avio: Add an URLProtocol flag for indicating that a protocol uses network
This definition is in two files, since the definitions will move
to the private header at the next bump.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-05 23:56:52 +02:00
Chris Evans
faaec4676c matroskadec: Fix a bug where a pointer was cached to an array that might later move due to a realloc()
Fixes bug #190
Chromium bug #100492
related to CVE-2011-3893

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-01-05 21:21:57 +01:00
Clément Bœsch
35da85562d mov: support timecode extraction. 2012-01-05 20:59:52 +01:00
Clément Bœsch
adc278788b mov: annotate read values in tmcd track. 2012-01-05 20:59:52 +01:00
Alex Converse
4274e481c0 mov: Support MOV_CH_LAYOUT_USE_DESCRIPTIONS for labeled descriptions. 2012-01-05 10:34:06 -08:00
Anton Khirnov
f9b9dd8740 lavf: cosmetics, reformat av_read_frame(). 2012-01-05 14:34:28 +01:00
Anton Khirnov
6450599e22 lavf: refactor av_read_frame() to make it easier to understand. 2012-01-05 14:34:13 +01:00
Michael Niedermayer
7f83db3124 Merge remote-tracking branch 'qatar/master'
* qatar/master: (46 commits)
  mtv: Make sure audio_subsegments is not 0
  v4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined
  avconv: add symbolic names for -vsync parameters
  flvdec: Fix compiler warning for uninitialized variables
  rtsp: Fix compiler warning for uninitialized variable
  ulti: convert to new bytestream API.
  swscale: Use standard multiple inclusion guards in ppc/ header files.
  Place some START_TIMER invocations in separate blocks.
  v4l2: list available formats
  v4l2: set the proper codec_tag
  v4l2: refactor device_open
  v4l2: simplify away io_method
  v4l2: cosmetics
  v4l2: uniform and format options
  v4l2: do not force interlaced mode
  avio: exit early in fill_buffer without read_packet
  vc1dec: fix invalid memory access for small video dimensions
  rv34: fix invalid memory access for small video dimensions
  rv34: joint coefficient decoding and dequantization
  avplay: Don't call avio_set_interrupt_cb(NULL)
  ...

Conflicts:
	Changelog
	avconv.c
	doc/APIchanges
	doc/indevs.texi
	libavcodec/adxenc.c
	libavcodec/dnxhdenc.c
	libavcodec/h264.c
	libavdevice/v4l2.c
	libavformat/flvdec.c
	libavformat/mtv.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-05 02:03:12 +01:00
Michael Niedermayer
c4eec85a1f Revert "rmdec: Avoid allocating huge packets"
This reverts commit 66f71f3b5e.

This causes regressions with RDT.
2012-01-05 00:51:12 +01:00
Michael Niedermayer
ad8e3304f7 lavf: use avg_frame_rate and packet number to exit find_stream_info
qatar does this too but clobbers the AVPacket.duration by approximate
values.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-05 00:49:45 +01:00
Michael Niedermayer
1171d938af lavf: revert commit bb99ae3ae9
Author: Michael Niedermayer <michaelni@gmx.at>
	Date:   Thu Nov 3 22:38:10 2011 +0100

	    lavf: fix null pointer dereference in rdt

	    Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

This is no longer needed and causes various problems with RTSP

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-05 00:23:24 +01:00
Shitiz Garg
feb15cee5e mtv: Make sure audio_subsegments is not 0
audio_subsegments would be 0 and cause floating point exceptions
Fixes bugzilla #144

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-04 17:47:19 -05:00
Chris Evans
f35e037c93 mkv: Fix a bug where a pointer was cached to an array that might later move due to
a realloc()

BUG=100492
Review URL: http://codereview.chromium.org/8366004
Fixes: 1 of 2 for CVE-2011-3893

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-04 21:58:08 +01:00
Jean First
2df73eefb4 flvdec: Fix compiler warning for uninitialized variables
These can't be used uninitialized in practice, but the
compiler doesn't realize it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-04 22:15:47 +02:00
Jean First
4be386b318 rtsp: Fix compiler warning for uninitialized variable
This one won't ever be used uninitialized in practice, but
the compiler doesn't realize it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-04 22:15:42 +02:00
Andrew Ryan
4452d58c72 Insert missing newline at end of error log message in mov demuxer. 2012-01-04 19:49:21 +01:00
Carl Eugen Hoyos
17edc370b2 yuv4 libquicktime packed 4:2:0 encoder and decoder.
Reviewed-by: Derek Buitenhuis
Reviewed-by: Paul B Mahol
2012-01-04 15:37:59 +01:00
Carl Eugen Hoyos
2754514787 v308 Quicktim Uncompressed 4:4:4 encoder and decoder.
Reviewed-by: Derek Buitenhuis
Reviewed-by: Paul B Mahol
2012-01-04 15:37:59 +01:00
Carl Eugen Hoyos
64e4f4836a Add decoder for Avid 1:1 10-bit RGB Packer (AVrp).
Fixes ticket #525.

Reviewed-by: Paul B Mahol
2012-01-04 15:37:58 +01:00
Janne Grunau
a2d1d21629 avio: exit early in fill_buffer without read_packet
Fixes an invalid free() with ass in avi. The sample in bug 98 passes
parts of AVPacket.data as buffer for the AVIOContext. Since the packet
is quite large fill_buffer tries to reallocate the buffer before doing
nothing. Fixes bug 98.
2012-01-04 11:18:24 +01:00
Michael Niedermayer
6072a19b4f lavf: Fix try_decode_frame() so it doesnt loop infinitely.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-04 04:08:46 +01:00
Michael Niedermayer
f37174bc19 electronicarts: Pass error through ea_read_header().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-04 04:02:22 +01:00
Oana Stratulat
0d3a51e5d2 electronicarts: Fix division by zero. Fixes Ticket #793
Signed-off-by: Oana Stratulat <oanaandreeastratulat@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-04 02:39:49 +01:00
Michael Niedermayer
ad1c8dd673 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: add dxtory test
  adx_parser: rewrite.
  adxdec: Validate channel count to fix a division by zero.
  adxdec: Do not require extradata.
  cmdutils: K&R reformatting cosmetics
  alacdec: implement the 2-pass prediction type.
  alacenc: implement the 2-pass prediction type.
  alacenc: do not generate invalid multi-channel ALAC files
  alacdec: fill in missing or guessed info about the extradata format.
  utvideo: proper median prediction for interlaced videos
  lavu: bump lavu minor for av_popcount64
  dca: K&R formatting cosmetics
  dct: K&R formatting cosmetics
  lavf: flush decoders in avformat_find_stream_info().
  win32: detect number of CPUs using affinity
  Add av_popcount64
  snow: Restore three mistakenly removed casts.

Conflicts:
	cmdutils.c
	doc/APIchanges
	libavcodec/adx_parser.c
	libavcodec/adxdec.c
	libavcodec/alacenc.c
	libavutil/avutil.h
	tests/fate/screen.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-04 01:12:34 +01:00
Justin Ruggles
779ef255e6 adx: add an adx muxer 2012-01-03 18:47:42 -05:00
Justin Ruggles
99baf2c7d0 adx: add AVFMT_GENERIC_INDEX to demuxer flags.
fixes seeking
2012-01-03 18:47:41 -05:00
Jean First
efaf448888 rtsp: Fix compiler warning for uninitialized variable.
Reviewed-by: Martin Storsjö
2012-01-03 23:01:28 +01:00
Anton Khirnov
212fd3a1f1 lavf: flush decoders in avformat_find_stream_info().
This means that avformat_find_stream_info() now works properly with
multiple threads, so there's no need to force thread count to 1.
2012-01-03 14:58:21 +01:00
Jean First
f2eb2e5c4f wtvdec: use intfloat.h instead of intfloat_readwrite.h
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 03:23:58 +01:00
Michael Niedermayer
7d8f115843 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegenc: use avctx->slices as number of slices
  v410enc: fix undefined signed left shift caused by integer promotion
  Release notes: mention cleaned up header includes
  fix Changelog file
  Fix a bunch of typos.
  Drop some pointless void* return value casts from av_malloc() invocations.
  wavpack: fix typos in previous cosmetic clean-up commit
  wavpack: cosmetics: K&R pretty-printing
  avconv: remove the 'codec framerate is different from stream' warning
  wavpack: determine sample_fmt before requesting a buffer
  bmv audio: implement new audio decoding API
  mpegaudiodec: skip all channels when skipping granules
  mpegenc: simplify muxrate calculation

Conflicts:
	Changelog
	avconv.c
	doc/RELEASE_NOTES
	libavcodec/h264.c
	libavcodec/mpeg12.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo.c
	libavformat/mpegenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 03:06:45 +01:00
Diego Biurrun
8fd35b1aac Fix a bunch of typos. 2012-01-02 16:41:25 +01:00
Diego Biurrun
44b0edda3f Drop some pointless void* return value casts from av_malloc() invocations. 2012-01-02 16:41:24 +01:00
Clément Bœsch
e1a8164d62 mp3enc: fix playback with mp3 encoded files on some devices.
This partially reverts 1fea432b; header variable needs to keep its value
in case it triggers "if (needed <= c.frame_size)".
2012-01-02 15:34:03 +01:00
Jean First
e2c1d3ec41 flvdec: use av_uninit to silence compiler warnings
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-02 03:38:58 +01:00
Paul B Mahol
dfa77dead2 y41p encoder and decoder
y41p is a packed 12-bit 4:1:1 YUV format used by Brooktree.

Fixes issue 1123 / ticket #102.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-02 03:35:23 +01:00
Janne Grunau
af9240cd3c mpegenc: simplify muxrate calculation
The fate-h264-bsf-mp4toannexb failures were caused by an integer
overflow of the unneeded multiplication.

Inspired by patch by: Michael Niedermayer <michaelni@gmx.at>
2012-01-02 00:23:40 +01:00
Reimar Döffinger
c914038d38 rawdec: Set start_time to 0 for raw audio files.
None of the raw audio files have timestamps, thus setting
start_time to 0 should be reasonable.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-01 22:27:04 +01:00
Carl Eugen Hoyos
835af79b05 Detect 'yuv2' as rawvideo also in avi.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-01 22:27:04 +01:00
Jean First
6bd8d61378 mov: av_dlog use PRId64 instead of %ld
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-01 21:19:07 +01:00
Jean First
d92d2af81f mxfdec: change av_log formatting %lx to PRIx64 and %li to PRIi64
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-01 21:15:46 +01:00
Michael Niedermayer
490c97bdf5 mpegpsenc: Fix integer overflow of the muxrate calculation.
this should fix the failure of h264-bsf-mp4toannexb on freebsd/openbsd

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-01 03:50:43 +01:00
Michael Niedermayer
4478e9d8db Merge remote-tracking branch 'qatar/master'
* qatar/master:
  FATE: add tests for dfa
  mpegaudiodec: fix seeking.
  mpegaudiodec: fix compilation when testing the unchecked bitstream reader
  threads: add sysconf based number of CPUs detection
  threads: always include necessary headers for number of CPUs detection
  threads: default to automatic thread count detection
  Changelog: restore version <next> header
  cook: K&R formatting cosmetics

Conflicts:
	Changelog
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-01 00:07:31 +01:00
Carl Eugen Hoyos
2cba62bd84 Do not map asf metadata key WM/Track to track.
WM/Track is 0-based (and deprecated in favour of WM/TrackNumber),
track is 1-based.

Fixes ticket #825.
2011-12-31 22:33:58 +01:00
Janne Grunau
e4e30256f8 threads: default to automatic thread count detection 2011-12-31 17:40:12 +01:00
Michael Niedermayer
bd553d5ea9 mxg: fix compiler warning for uninitialized variables
Based on work by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-31 17:15:31 +01:00
Jean First
acc88f07d4 id3v2: fix compiler warning for uninitialized variables
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-31 17:15:31 +01:00
Michael Niedermayer
e6362f3a3c lavf: ffio_limit(), treat avio_size()==0 as error.
This works around issues arising from inputs that claim to have a
filesize of 0.

Reported-by: buzz_
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-31 15:35:39 +01:00
Michael Niedermayer
5500e65342 flvdec: Check avpriv_mpeg4audio_get_config() return
value before using its output.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-31 04:54:26 +01:00
Jean First
b6ffceefb5 mpegts: remove unused variable
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-31 02:27:11 +01:00
Jean First
8aed73c355 movenc: remove unused variables
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-31 02:27:11 +01:00
Jean First
576ada791a cache: use av_freep instead of av_free in cache_open
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-31 02:27:10 +01:00
Jean First
3ceb4c907e cache: remove unused variable in cache_open
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-31 02:27:10 +01:00
Michael Niedermayer
bace181b48 flvdec: Add comment about the 5 second threshold
Idea-by: Reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-30 20:34:55 +01:00
Paul B Mahol
ba10207bbe Use more designated initializers.
Also remove some pointless NULL/0 assigments.

C++ code must be left as it is because named struct
initializers are not supported by C++ standard.
2011-12-30 20:00:53 +01:00
Paul B Mahol
73ba2c1e62 mp3enc: remove unused variable 2011-12-30 19:42:59 +01:00
Michael Niedermayer
83f70805c0 flvdec: Print a warning in all failure cases of parse_keyframes_index()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-30 04:29:56 +01:00
Michael Niedermayer
67c734ea5c flvdec: Disable metadatacreator "MEGA" hack
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-30 04:29:55 +01:00
Michael Niedermayer
df0bff6643 flvdec: Check index for being valid
Fixes seeking in Enigma_Principles_of_Lust.flv

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-30 04:29:54 +01:00
Michael Niedermayer
00c0465dbc Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: split off DPCM codec FATE tests into their own file
  fate: split off PCM codec FATE tests into their own file
  libvorbis: K&R reformatting cosmetics
  libmp3lame: K&R formatting cosmetics
  fate: Add a video test for xxan decoder
  mpegvideo_enc: K&R cosmetics (line 1000-2000).
  avconv: K&R cosmetics
  qt-faststart: Fix up indentation
  indeo4: remove two unused variables
  doxygen: cleanup style to support older doxy
  fate: add more tests for VC-1 decoder
  applehttpproto: Apply the same reload interval changes as for the demuxer
  applehttp: Use half the target duration as interval if the playlist didn't update
  applehttp: Use the last segment duration as reload interval
  lagarith: add decode support for arith rgb24 mode

Conflicts:
	avconv.c
	libavcodec/libmp3lame.c
	libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-30 03:46:24 +01:00
Michael Niedermayer
b9e0e9537a nsvdec: Check av_malloc(string_size)
This can easily be NULL as string_size can be 2g in a damaged file.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-30 01:44:47 +01:00
Michael Niedermayer
bf5cc80519 issdemux: Check packet_size for validity
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-29 15:25:07 +01:00
Andrey Utkin
1f8bf1ef38 applehttpproto: Apply the same reload interval changes as for the demuxer
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-29 11:42:55 +02:00
Martin Storsjö
617475a95c applehttp: Use half the target duration as interval if the playlist didn't update
This is mandated in draft-pantos-http-live-streaming-07, section
6.3.4.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-29 11:42:45 +02:00
Andrey Utkin
356ae5f65b applehttp: Use the last segment duration as reload interval
According to draft-pantos-http-live-streaming-07, 6.3.4,
the duration of the last media segment in the playlist
should be used as initial minimum reload delay.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-29 11:42:21 +02:00
Michael Niedermayer
6071e4d87a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  v410dec: Check for sufficient input data. Fixes crash
  fate: Add v210 codec regression tests
  mpegts: adjustable minimum PES payload
  mpegts: properly output large audio packets
  avformat: Add SMJPEG demuxer.
  Indeo 4 decoder

Conflicts:
	doc/general.texi
	libavcodec/v410dec.c
	libavcodec/version.h
	libavformat/mpegtsenc.c
	libavformat/smjpeg.c
	libavformat/version.h
	tests/codec-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-29 01:40:34 +01:00
Jindřich Makovička
891ce00c8d mpegts: adjustable minimum PES payload
With the current default PES packet size, and very small audio bitrates,
audio packet duration gets too long. For players, which wait for a whole
audio packet (or more) it takes a very long time to start playing sound.

For 24kbps audio, one PES packet is about 1 second long. On Motorola STBs,
we observe about 3 second delay before the playback starts with the
default setting.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-28 20:31:54 +01:00
Jindřich Makovička
6fa9843b4b mpegts: properly output large audio packets
Do not assume the audio packets being always smaller than
DEFAULT_PES_PAYLOAD_SIZE.

Signed-off-by: Jindřich Makovička <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-28 20:31:15 +01:00
Paul B Mahol
b5aecc6bc0 avformat: Add SMJPEG demuxer.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-12-28 20:17:20 +01:00
Carl Eugen Hoyos
ec0dc7e2e0 Make Interplay palette opaque and increase its dynamics. 2011-12-27 18:26:31 +01:00
Marton Balint
7b2dba1c50 dv: fix avpriv_dv_codec_profile with lowres > 0
Fixes ticket #44.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-26 22:12:20 +01:00
Michael Niedermayer
084bd109fc id3v2: fix variable type for uncompress()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-26 22:12:20 +01:00
Adrian Drzewiecki
7e09fe15d5 Process compressed id3v2 tags.
ID3v2.4 allows for zlib compressed tags, but libavformat skips them.
Implement code to inflate compressed tags.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-26 22:12:20 +01:00
Clément Bœsch
3701d547ac gxf: remove gxf_ prefix to timecode metadata keys.
This will allow a shared "timecode" key metadata between formats to ease
third-party extraction.
2011-12-26 11:22:29 +01:00
Matthieu Bouron
357cb53306 dv: add timecode to metadata
Reviewed-by: Reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-26 05:46:29 +01:00
Michael Niedermayer
1795fed7bc segafilm: fail earlier in case theres not enough bytestream left for a
audio packet.
This prevents a potentially large memory allocation.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-25 04:49:23 +01:00
Michael Niedermayer
27d323577c avio: Fix ffio_limit() when due to seeking past the end less than 0 bytes remain.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-25 04:48:26 +01:00
Michael Niedermayer
0d4404ed65 asfdec: fix endless loop on EOF
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-24 23:21:40 +01:00
Michael Niedermayer
47c4713a23 sierravmd: limit packetsize to the amount that could be read.
Fixes huge allocations.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-24 22:06:25 +01:00
Michael Niedermayer
66f71f3b5e rmdec: Avoid allocating huge packets
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-24 21:26:52 +01:00
Michael Niedermayer
43abef9fde rpl: Fix near infinite loop in index reading due to missing eof check.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-24 19:57:18 +01:00
Carl Eugen Hoyos
32c49389bc Make the palette in Quake II CIN files opaque and increase its dynamics. 2011-12-24 12:44:30 +01:00
Carl Eugen Hoyos
0d59ae32c2 Make mov palette opaque or load alpha if present. 2011-12-24 12:38:32 +01:00
Carl Eugen Hoyos
64cafe340b Make the avi palette opaque. 2011-12-24 03:41:50 +01:00
Michael Niedermayer
ad9e0ed170 avio: fix handling of , in urls
Fixes Ticket805

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 23:59:10 +01:00
Michael Niedermayer
8ff4fff774 flvdec: disable new midstream param change code not only for h264 but all cases.
It breaks some samples and iam not aware of one that it fixes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 23:06:56 +01:00
Michael Niedermayer
d1c28e3530 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  build: fix standalone compilation of OMA muxer
  build: fix standalone compilation of Microsoft XMV demuxer
  build: fix standalone compilation of Core Audio Format demuxer
  kvmc: fix invalid reads
  4xm: Add a check in decode_i_frame to prevent buffer overreads
  adpcm: fix IMA SMJPEG decoding
  options: set minimum for "threads" to zero
  bsd: use number of logical CPUs as automatic thread count
  windows: use number of CPUs as automatic thread count
  linux: use number of CPUs as automatic thread count
  pthreads: reset active_thread_type when slice thread_init returrns early
  v410dec: include correct headers
  Drop ALT_ prefix from BITSTREAM_READER_LE name.
  lavfi: always build vsrc_buffer.
  ra144enc: zero the reflection coeffs if the filter is unstable
  sws: readd PAL8 to isPacked()
  mov: Don't stick the QuickTime field ordering atom in extradata.
  truespeech: fix invalid reads in truespeech_apply_twopoint_filter()

Conflicts:
	configure
	libavcodec/4xm.c
	libavcodec/avcodec.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavformat/Makefile
	libswscale/swscale_internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 03:25:51 +01:00
Michael Niedermayer
9f50dafe90 udp: support non blocking reads with fifo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 01:51:47 +01:00
Michael Niedermayer
bc900501e0 udp: Replace double select() by select+mutex+cond.
When no data was available both the buffer thread as well as
the main thread would block in select(), when data becomes
available both should move forward and as data is read in the
buffer thread the main thread would block in select() later
the read data was put in the fifo but the main thread still
would be blocked in select() until either the timeout or
another packet would come in.

This is solved in this commit by using a mutex and a condition
variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 01:42:42 +01:00
Michael Niedermayer
3dcbafc777 udp: return circular buffer error if such error happened.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 01:41:15 +01:00
Diego Biurrun
4e8d6218c3 build: fix standalone compilation of OMA muxer
The muxer depends on the id3v2 writing code, so link against it.
2011-12-23 00:45:11 +01:00
Diego Biurrun
e2c97aee39 build: fix standalone compilation of Microsoft XMV demuxer
The demuxer depends on the RIFF codec tags code, so link against it.
2011-12-23 00:45:10 +01:00
Diego Biurrun
408dbbd0a7 build: fix standalone compilation of Core Audio Format demuxer
The demuxer depends on code from mov.c, which in turn depends on
code from mov_chan.c, so link against it.
2011-12-23 00:45:08 +01:00
Michael Niedermayer
dd1fb65287 Merge remote-tracking branch 'tjoppen/fuzz_fixes'
* tjoppen/fuzz_fixes:
  mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows
  mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
  mxfdec: Sanity check PreviousPartition
  mxfdec: Never seek back in local sets and KLVs
  mxfdec: Move the current_partition check inside mxf_read_header()
  mxfdec: Fix infinite loop in mxf_packet_timestamps()
  mxfdec: Check url_feof() in mxf_read_local_tags()
  mxfdec: Check for NULL component

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 14:04:49 +01:00
Alex Converse
4bf3c8f226 mov: Don't stick the QuickTime field ordering atom in extradata.
The 'fiel' atoms can be found in H.264 tracks clobbering the extradata.
MJPEG supports non field based extradata, and this data should be
preserved when copying.
2011-12-21 22:04:37 -08:00
Paul B Mahol
a4209ad631 lavf: Add SMJPEG demuxer.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 04:12:45 +01:00
Michael Niedermayer
2a85358d4f libavformat: increase LIBAVFORMAT_VERSION_MICRO to 100
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 03:06:06 +01:00
Michael Niedermayer
52c522c720 Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  asfdec: add side data to ASFStream packet instead of output packet.
  idroqdec: set AVFMTCTX_NOHEADER and create streams as they occur.
  nellymoserdec: Indicate that the decoder can handle changed parameters
  libavcodec: Apply parameter change side data when decoding audio
  flvdec: Add param change side data if the sample rate or channels have changed
  libavformat: Add a utility function for adding parameter change side data
  libavcodec: Define a side data type for parameter changes
  aacdec: Handle new extradata passed as side data
  flvdec: Export new AAC/H.264 extradata as side data on the next packet
  libavcodec: Define a side data type for new extradata
  flacdec: skip all track indices at once instead of looping.
  mxf: Add PictureEssenceCoding UL for V210.
  mxfdec: consider QuantizationBits between 17 and 24 to be pcm_s24*
  mxfenc: Add support for MPEG-2 MP@HL-14 in mxf container.
  mxf: H.264/MPEG-4 AVC Intra support
  configure: Show whether the safe bitstream reader is enabled
  x86: Tighten register constraints for decode_significance*_x86.
  Replace Subversion revisions in comments by Git hashes.
  h264_cabac: synchronize decode_significance_*_x86 conditionals
  w32threads: wait for the waked thread in pthread_cond_signal.
  ...

Conflicts:
	libavcodec/avcodec.h
	libavcodec/version.h
	libavformat/flvdec.c
	libavformat/utils.c
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 01:51:53 +01:00
Michael Niedermayer
8d960fbc70 ipmovie: fix FPE
Fixed Ticket807
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 00:25:47 +01:00
Justin Ruggles
e9dc920127 asfdec: add side data to ASFStream packet instead of output packet.
fixes memleak of side data
2011-12-21 17:52:31 -05:00
Justin Ruggles
3f9257c5a5 idroqdec: set AVFMTCTX_NOHEADER and create streams as they occur.
This fixes demuxing of file where the first packet is not audio. Such files
are generated by our idroq muxer. It also fixes demuxing of audio only
idroq files.
2011-12-21 16:51:12 -05:00
Martin Storsjö
2215c39e94 flvdec: Add param change side data if the sample rate or channels have changed
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-21 22:52:41 +02:00
Martin Storsjö
3e79c2adb1 libavformat: Add a utility function for adding parameter change side data
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-21 22:52:40 +02:00
Martin Storsjö
251f320f7d flvdec: Export new AAC/H.264 extradata as side data on the next packet
Compared to just overwriting the old extradata, this has the
advantage of letting the decoder know exactly when the
extradata changed (otherwise it is changed immediately when the
new extradata packet is demuxed, even if there's old queued packets
awaiting to be decoded). This makes it easier for decoders to
actually react to the change, so they won't have to inspect
the extradata for each packet to see if it might have changed.

This works when sequentially playing a file with sample rate
changes, but if seeking past a new extradata packet in the
file, it obviously doesn't work properly. That case doesn't
work in flash player either, so it's probably ok not to handle
it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-12-21 22:52:38 +02:00
Nicolas George
20af3af575 mov: replace AVERROR(EOF) with AVERROR_EOF. 2011-12-21 19:23:03 +01:00
Paul B Mahol
17c84f4ed2 flacdec: skip all track indices at once instead of looping.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-12-21 10:44:57 -05:00
Tomas Härdin
c15da5941d mxf: Add PictureEssenceCoding UL for V210.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-21 16:28:45 +01:00
Tomas Härdin
6547fd9264 mxfdec: consider QuantizationBits between 17 and 24 to be pcm_s24*
This fixes playback of BRD38772509.mxf.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-21 16:28:42 +01:00
Daniel Kristjansson
adff77f28c mxfenc: Add support for MPEG-2 MP@HL-14 in mxf container.
Support Main Profile at High 1440 Level in MXF container,
using essence coding label from SMPTE RDD 9, table 6.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-21 16:28:41 +01:00
Baptiste Coudurier
4ee04247f0 mxf: H.264/MPEG-4 AVC Intra support
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-12-21 16:28:26 +01:00
Michael Niedermayer
1fbb859cdf Merge remote-tracking branch 'tjoppen/mxf_fixes_20111220'
* tjoppen/mxf_fixes_20111220:
  mxfdec: Sanity-check SampleRate
  mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()
  mxfdec: Remove unused variables
  mxfdec: Make sure x < index_table->nb_ptses
  mxfdec: Ignore the last entry in Avid's index table segments

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-21 15:51:51 +01:00
Tomas Härdin
cc1dda851b mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows 2011-12-21 14:18:08 +01:00
Tomas Härdin
0cd21ddaed mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
This fixes SIGSEGV on files with both CBR and VBR index segments (zzuf6.mxf).
2011-12-21 14:18:08 +01:00
Tomas Härdin
46d65fb8a5 mxfdec: Sanity check PreviousPartition
Without this certain files could get the demuxer stuck in a loop
2011-12-21 14:17:44 +01:00
Tomas Härdin
e7839602f4 mxfdec: Never seek back in local sets and KLVs
Specially crafted files can lead the parsing code to take too long.
We fix a lot of these problems by not allowing local tags to extend past the
end of the set and not allowing other KLVs to be read past the end of
themselves.
2011-12-21 14:17:29 +01:00
Tomas Härdin
184f479096 mxfdec: Move the current_partition check inside mxf_read_header()
This fixes SIGSEGV on files where this is actually the case, such as zzuf4.mxf
2011-12-21 14:16:03 +01:00
Tomas Härdin
4ae7d45170 mxfdec: Fix infinite loop in mxf_packet_timestamps()
This can happen if an index table segment has a very large IndexStartPosition.
zzuf3.mxf is an example of such a file.
2011-12-21 14:16:03 +01:00
Tomas Härdin
2116e4ba91 mxfdec: Check url_feof() in mxf_read_local_tags()
This fixes the infinite loop with zzuf2.mxf
2011-12-21 14:15:51 +01:00
Tomas Härdin
5e5e69d078 mxfdec: Check for NULL component
This fixes SIGSEGV with zzuf1.mxf
2011-12-21 13:48:39 +01:00
Michael Niedermayer
077b086dea avio: remove ENOTSUP mention in doxy as its not available on all supported platforms
and thus cannot be used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-21 04:52:34 +01:00
Michael Niedermayer
3be1a4ba9a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: always align height by 32 pixel
  raw: add 10bit YUV definitions
  nut: support 10bit YUV
  mpegvideo_enc: separate declarations and statements
  oma: make header compile standalone
  vp3: Reorder some functions to fix VP3 build with Theora disabled.
  build: fix standalone compilation of ADX encoder
  build: fix standalone compilation of ADPCM decoders
  build: fix standalone compilation of mpc7/mpc8 decoders
  4xm: Use bytestream2 functions to prevent overreads
  bytestream: add a new set of bytestream functions with overread checking
  mpegts: Suppress invalid timebase warnings on DMB streams.
  mpegts: Fix typo in handling sections in the PMT.
  vc1dec: Use the right pointer type for the tmp pointer

Conflicts:
	libavcodec/4xm.c
	libavcodec/utils.c
	libavcodec/vc1dec.c
	libavcodec/vp3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-21 03:40:53 +01:00
Sergey Radionov
139cef8e29 network: properly declare WSADATA in windows
Fixed "ISO C90 forbids mixed declarations and code" in ff_network_init

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-12-21 03:27:19 +01:00
Tomas Härdin
7feb7f16a8 mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()
Only the OPAtom demuxing logic is guaranteed to have index tables, meaning OP1a
files that lack an index would cause SIGSEGV.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-21 00:03:43 +01:00
Luca Barbato
432f0e5b7d nut: support 10bit YUV
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-12-21 00:00:03 +01:00
Diego Biurrun
a55eb1586c oma: make header compile standalone 2011-12-20 22:38:53 +01:00