Commit Graph

9414 Commits

Author SHA1 Message Date
Michael Niedermayer
a369a6b858 Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  fate: add golomb-test
  golomb-test: K&R formatting cosmetics
  h264: Split h264-test off into a separate file - golomb-test.c.
  h264-test: cleanup: drop timer invocations, commented out code and other cruft
  h264-test: Remove unused DSP and AVCodec contexts and related init calls.
  adpcm: Add missing stdint.h #include to fix standalone header compilation.
  lavf: add functions for accessing the fourcc<->CodecID mapping tables.
  lavc: set AVCodecContext.codec in avcodec_get_context_defaults3().
  lavc: make avcodec_close() work properly on unopened codecs.
  lavc: add avcodec_is_open().
  lavf: rename AVInputFormat.value to raw_codec_id.
  lavf: remove the pointless value field from flv and iv8
  lavc/lavf: remove unnecessary symbols from the symbol version script.
  lavc: reorder AVCodec fields.
  lavf: reorder AVInput/OutputFormat fields.
  mp3dec: Fix a heap-buffer-overflow
  adpcmenc: remove some unneeded casts
  adpcmenc: use int16_t and uint8_t instead of short and unsigned char.
  adpcmenc: fix adpcm_ms extradata allocation
  adpcmenc: return proper AVERROR codes instead of -1
  ...

Conflicts:
	doc/APIchanges
	libavcodec/Makefile
	libavcodec/adpcmenc.c
	libavcodec/avcodec.h
	libavcodec/h264.c
	libavcodec/libavcodec.v
	libavcodec/mpc7.c
	libavcodec/mpegaudiodec.c
	libavcodec/options.c
	libavformat/Makefile
	libavformat/avformat.h
	libavformat/flvdec.c
	libavformat/libavformat.v

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-01 02:36:09 +01:00
Anton Khirnov
dd6d3b0e02 lavf: add functions for accessing the fourcc<->CodecID mapping tables.
Fixes bug 212.
2012-01-31 16:53:35 +01:00
Anton Khirnov
bc90199848 lavc: set AVCodecContext.codec in avcodec_get_context_defaults3().
This way, if the AVCodecContext is allocated for a specific codec, the
caller doesn't need to store this codec separately and then pass it
again to avcodec_open2().

It also allows to set codec private options using av_opt_set_* before
opening the codec.
2012-01-31 16:53:35 +01:00
Anton Khirnov
af08d9aeea lavc: add avcodec_is_open().
It allows to check whether an AVCodecContext is open in a documented
way. Right now the undocumented way this check is done in lavf/lavc is
by checking whether AVCodecContext.codec is NULL. However it's desirable
to be able to set AVCodecContext.codec before avcodec_open2().
2012-01-31 07:55:24 +01:00
Anton Khirnov
f7fe41a04f lavf: rename AVInputFormat.value to raw_codec_id.
It's only used by raw demuxers for storing the codec id.
2012-01-31 07:50:31 +01:00
Anton Khirnov
9a463917d3 lavf: remove the pointless value field from flv and iv8
The demuxers don't use it in any way.
2012-01-31 07:48:03 +01:00
Anton Khirnov
afa4069e3b lavc/lavf: remove unnecessary symbols from the symbol version script. 2012-01-31 07:26:31 +01:00
Anton Khirnov
183eaa9a25 lavf: reorder AVInput/OutputFormat fields.
Put all private fields at the end and mark them as such so they can be
easily changed/removed.

This breaks ABI.
2012-01-31 07:21:06 +01:00
Michael Niedermayer
151ecc2aec Merge remote-tracking branch 'qatar/master'
* qatar/master: (26 commits)
  avconv: deprecate the -deinterlace option
  doc: Fix the name of the new function
  aacenc: make sure to encode enough frames to cover all input samples.
  aacenc: only use the number of input samples provided by the user.
  wmadec: Verify bitstream size makes sense before calling init_get_bits.
  kmvc: Log into a context at a log level constant.
  mpeg12: Pad framerate tab to 16 entries.
  kgv1dec: Increase offsets array size so it is large enough.
  kmvc: Check palsize.
  nsvdec: Propagate errors
  nsvdec: Be more careful with av_malloc().
  nsvdec: Fix use of uninitialized streams.
  movenc: cosmetics: Get rid of camelCase identifiers
  swscale: more generic check for planar destination formats with alpha
  doc: Document mov/mp4 fragmentation options
  build: Use order-only prerequisites for creating FATE reference file dirs.
  x86 dsputil: provide SSE2/SSSE3 versions of bswap_buf
  rtsp: Remove some unused variables from ff_rtsp_connect().
  avutil: make intfloat api public
  avformat_write_header(): detail error message
  ...

Conflicts:
	doc/APIchanges
	doc/ffmpeg.texi
	doc/muxers.texi
	ffmpeg.c
	libavcodec/kmvc.c
	libavcodec/x86/Makefile
	libavcodec/x86/dsputil_yasm.asm
	libavcodec/x86/pngdsp-init.c
	libavformat/movenc.c
	libavformat/movenc.h
	libavformat/mpegtsenc.c
	libavformat/nsvdec.c
	libavformat/utils.c
	libavutil/avutil.h
	libswscale/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-31 02:46:26 +01:00
Michael Niedermayer
b8c1655882 avidec: print informative error messages if seeking fails.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-31 00:20:52 +01:00
Clément Bœsch
6a3cc21242 mp3dec: fix truncating packet error message while decoding a complete MP3.
The MP3 demuxer split the data in packets of 1024B which are later split
in MP3 frames by the MPEG audio parser. The last read is "truncated",
but this should not raise any error.

Solution-by: Michael Niedermayer
2012-01-30 23:29:34 +01:00
Martin Storsjö
75ab1e62d4 movdec: Ignore sample_degradation_priority bits when checking first_sample_flags
This makes the first packet of a track fragment run to get
the keyframe flag set properly if sample_degradation_priority
is nonzero.

This makes the keyframes flag be set properly for ismv files
created by Microsoft.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-31 00:13:31 +02:00
Martin Storsjö
89f6e8a20c flvdec: Interpret a toplevel 'object' type metadata item as normal metadata, too
Previously, we've only passed the key string on to the recursive
amf_parse_object for the mixedarray type, not for 'object'. By
passing the key string on, the recursive amf_parse_object can
store the amf objects as metadata.

This kind of data was seen in data from XSplit Broadcaster, received
over RTMP via Wowza. This patch allows reading this metadata.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-30 23:34:47 +02:00
Alex Converse
c898431ca5 nsvdec: Propagate errors
Related to CVE-2011-3940.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-01-30 10:15:41 -08:00
Alex Converse
8fd8a48263 nsvdec: Be more careful with av_malloc().
Check results for av_malloc() and fix an overflow in one call.

Related to CVE-2011-3940.

Based in part on work from Michael Niedermayer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-01-30 10:15:19 -08:00
Michael Niedermayer
6a89b41d97 nsvdec: Fix use of uninitialized streams.
Fixes CVE-2011-3940 (Out of bounds read resulting in out of bounds write)

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5c011706bc)

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-30 10:14:06 -08:00
Martin Storsjö
b7d3dd907f movenc: cosmetics: Get rid of camelCase identifiers
Also add spacing around operators on touched lines, and split
one line to match the common style.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-30 19:24:39 +02:00
Carl Eugen Hoyos
5f27374c1b Cosmetics: Add bit per component information to v308 comment. 2012-01-30 11:30:52 +01:00
Martin Lambers
6fe12c7ff2 Detect jps and pns files as (3D) jpg and png images. 2012-01-30 11:28:08 +01:00
Diego Biurrun
a846202343 rtsp: Remove some unused variables from ff_rtsp_connect(). 2012-01-30 10:19:47 +01:00
Rafaël Carré
420df8b7c4 avformat_write_header(): detail error message
Give the exact aspect ratios when there is a mismatch between encoder
and muxer.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-30 07:32:57 +01:00
Mike Melanson
cc09dc7863 s/vbsf/bsf/
-vbsf doesn't exist anymore. It got renamed to -bsf somewhere along the
line. Update print statement accordingly.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-30 07:30:21 +01:00
Mike Melanson
b864b38397 yuv4mpeg: allow YUV4MPEG2 demuxer to recognize 'C420' colorspace.
Current demuxer recognizes several colorspace formats that begin with 'C420'
but does not yet recognize plain 'C420'. GStreamer's y4menc component
generates .y4m files with a 'C420' colorspace. This new comparison is
placed after the other 'C420' checks so that it doesn't interfere with
them.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-30 07:30:21 +01:00
Peter Ross
15d838b745 bintext: use private options now that AVFormatParameters has been removed
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-29 18:11:39 +01:00
Michael Niedermayer
c065255bba Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aacenc: Fix LONG_START windowing.
  aacenc: Fix a bug where deinterleaved samples were stored in the wrong place.
  avplay: use the correct array size for stride.
  lavc: extend doxy for avcodec_alloc_context3().
  APIchanges: mention avcodec_alloc_context()/2/3
  avcodec_align_dimensions2: set only 4 linesizes, not AV_NUM_DATA_POINTERS.
  aacsbr: ARM NEON optimised sbrdsp functions
  aacsbr: align some arrays
  aacsbr: move some simdable loops to function pointers
  cosmetics: Remove extra newlines at EOF

Conflicts:
	libavcodec/utils.c
	libavfilter/formats.c
	libavutil/mem.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-29 00:34:59 +01:00
Reimar Döffinger
34751f8313 Demux all parts of concatenated H.264.
We may or may not be able to play the latter parts
but not demuxing at all seems like the worst possible behaviour.
Fixes playback of e.g.
http://playlist.yahoo.com/makeplaylist.dll?sid=128114687&sdm=web&pt=rd
As a proper solution either multiple video streams should
be exported or side data should be used to update extradata
if necessary.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-28 22:01:09 +01:00
Reimar Döffinger
bb2d42c22f Set AVFMT_TS_NONSTRICT for framecrc muxer.
Since it is set for e.g. webm muxer we should make it possible
to test such streams with framecrc, too.
Though the primary reason is that this allows the H.264 tests
to not run into this check when fixing raw video encode to
pass pts values on.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-28 22:01:09 +01:00
Reimar Döffinger
a0eb8de5e0 Merge palette-only header with actual video frame.
This fixes the video frame pts (off by one for each MVIh)
and makes the "key frames" decode stand-alone (MVIh
contains only palette, such a palette-only frame being
marked as key frame is not really correct).

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-28 22:01:05 +01:00
Michael Niedermayer
e37f161e66 Merge remote-tracking branch 'qatar/master'
* qatar/master: (71 commits)
  movenc: Allow writing to a non-seekable output if using empty moov
  movenc: Support adding isml (smooth streaming live) metadata
  libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set
  sunrast: Document the different Sun Raster file format types.
  sunrast: Add a check for experimental type.
  libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat
  lavf: remove disabled FF_API_SET_PTS_INFO cruft
  lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft
  lavf: remove disabled FF_API_REORDER_PRIVATE cruft
  lavf: remove disabled FF_API_SEEK_PUBLIC cruft
  lavf: remove disabled FF_API_STREAM_COPY cruft
  lavf: remove disabled FF_API_PRELOAD cruft
  lavf: remove disabled FF_API_NEW_STREAM cruft
  lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft
  lavf: remove disabled FF_API_MUXRATE cruft
  lavf: remove disabled FF_API_FILESIZE cruft
  lavf: remove disabled FF_API_TIMESTAMP cruft
  lavf: remove disabled FF_API_LOOP_OUTPUT cruft
  lavf: remove disabled FF_API_LOOP_INPUT cruft
  lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft
  ...

Conflicts:
	doc/APIchanges
	libavcodec/8bps.c
	libavcodec/avcodec.h
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/options.c
	libavcodec/sunrast.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/x86/h264_deblock.asm
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavformat/avformat.h
	libavformat/avio.c
	libavformat/avio.h
	libavformat/aviobuf.c
	libavformat/dv.c
	libavformat/mov.c
	libavformat/utils.c
	libavformat/version.h
	libavformat/wtv.c
	libavutil/Makefile
	libavutil/file.c
	libswscale/x86/input.asm
	libswscale/x86/swscale_mmx.c
	libswscale/x86/swscale_template.c
	tests/ref/lavf/ffm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-28 07:53:34 +01:00
Alex Converse
7181c4edee cosmetics: Remove extra newlines at EOF 2012-01-27 17:19:09 -08:00
Martin Storsjö
e771e6dd63 movenc: Allow writing to a non-seekable output if using empty moov
In this mode, no seeks will be done except for within moov/moof
fragments, which should fit within the AVIOContext buffer.

This allows pushing live smooth streaming format data to
a live publishing point on IIS over http.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-27 21:12:41 +02:00
Martin Storsjö
f532210499 movenc: Support adding isml (smooth streaming live) metadata
This metadata is required for pushing a live stream to an IIS
publishing point.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-27 21:12:28 +02:00
Anton Khirnov
c5254755c0 lavf: remove disabled FF_API_SET_PTS_INFO cruft 2012-01-27 10:52:43 +01:00
Anton Khirnov
374e469b8d lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft 2012-01-27 10:52:43 +01:00
Anton Khirnov
bf868727d7 lavf: remove disabled FF_API_REORDER_PRIVATE cruft 2012-01-27 10:52:43 +01:00
Anton Khirnov
fd87ba3220 lavf: remove disabled FF_API_SEEK_PUBLIC cruft 2012-01-27 10:52:43 +01:00
Anton Khirnov
bd4c51312b lavf: remove disabled FF_API_STREAM_COPY cruft 2012-01-27 10:52:43 +01:00
Anton Khirnov
2a0f868cfa lavf: remove disabled FF_API_PRELOAD cruft 2012-01-27 10:52:43 +01:00
Anton Khirnov
1329827e79 lavf: remove disabled FF_API_NEW_STREAM cruft 2012-01-27 10:52:43 +01:00
Anton Khirnov
adad5b88f8 lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft 2012-01-27 10:52:43 +01:00
Anton Khirnov
f0cb13958d lavf: remove disabled FF_API_MUXRATE cruft 2012-01-27 10:52:43 +01:00
Anton Khirnov
2f5e728b58 lavf: remove disabled FF_API_FILESIZE cruft 2012-01-27 10:52:43 +01:00
Anton Khirnov
df0bb26aca lavf: remove disabled FF_API_TIMESTAMP cruft 2012-01-27 10:52:42 +01:00
Anton Khirnov
3bbfd3026c lavf: remove disabled FF_API_LOOP_OUTPUT cruft 2012-01-27 10:52:42 +01:00
Anton Khirnov
6dc345555f lavf: remove disabled FF_API_LOOP_INPUT cruft 2012-01-27 10:52:42 +01:00
Anton Khirnov
b32e30faa1 lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft 2012-01-27 10:52:42 +01:00
Anton Khirnov
2d70912cc2 lavf: remove disabled FF_API_FLAG_RTP_HINT cruft 2012-01-27 10:52:42 +01:00
Anton Khirnov
1d911bb404 lavf: remove disabled FF_API_SDP_CREATE cruft 2012-01-27 10:52:42 +01:00
Anton Khirnov
64f6f6f836 lavf: remove disabled FF_API_GUESS_IMG2_CODEC cruft 2012-01-27 10:52:42 +01:00
Anton Khirnov
21824e5b88 lavf: remove disabled FF_API_PKT_DUMP cruft 2012-01-27 10:52:42 +01:00