Commit Graph

8039 Commits

Author SHA1 Message Date
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
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
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
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
Anton Khirnov
cc10ab79ec lavf: remove disabled FF_API_FIND_INFO_TAG cruft 2012-01-27 10:52:42 +01:00
Anton Khirnov
ecd5f41a06 lavf: remove disabled FF_API_PARSE_DATE cruft 2012-01-27 10:52:42 +01:00
Anton Khirnov
997420abf2 lavf: remove disabled FF_API_DUMP_FORMAT cruft 2012-01-27 10:52:42 +01:00
Anton Khirnov
2fb7501938 lavf: remove disabled FF_API_FORMAT_PARAMETERS cruft
Also remove now unused AVFormatParameters struct and
AVOutputFormat.set_parameters().
2012-01-27 10:52:42 +01:00
Anton Khirnov
38233fc131 lavf: remove disabled FF_API_OLD_METADATA2 cruft 2012-01-27 10:52:42 +01:00
Anton Khirnov
2439f2ca82 lavf: remove disabled FF_API_OLD_AVIO cruft 2012-01-27 10:52:42 +01:00
Anton Khirnov
a17479dfce lavf: increase major version from 53 to 54. 2012-01-27 10:52:39 +01:00
Anton Khirnov
6e9651d106 lavf: remove AVFormatParameters from AVFormatContext.read_header signature 2012-01-27 10:51:57 +01:00
Tomas Härdin
62271c4c9a mxfdec: Fix files with essence containers larger than 2 GiB.
For such files, accumulating into an int would cause an overflow.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-01-26 15:47:50 +01:00
Jean First
4fbd3e89e7 mxfdec: Employ correct printf conversion specifiers for POSIX int types.
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-01-26 15:31:55 +01:00
Janne Grunau
b3461c29c1 lavf: prevent infinite loops while flushing in avformat_find_stream_info
If no data was seen for a stream decoder are returning 0 when fed with
empty packets for flushing. We can stop flushing when the decoder does
not return delayed delayed frames anymore. Changes try_decode_frame()
return value to got_picture or negative error.

CC: libav-stable@libav.org
2012-01-26 00:45:05 +01:00
Alex Converse
d2ee8c1779 matroskadec: Pad AAC extradata.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

CC: libav-stable@libav.org
2012-01-25 14:46:06 -08:00