Commit Graph

8423 Commits

Author SHA1 Message Date
Nicolas George
86af962830 lavf/utils: use correct format string for int64_t. 2011-09-25 11:18:41 +02:00
Nicolas George
9c98af13af lavf/utils: use AV_NOWARN_DEPRECATED in compatibility code. 2011-09-25 11:18:41 +02:00
Clément Bœsch
6f8c8fa8af bit: use explicit struct initializers. 2011-09-25 10:44:31 +02:00
Michael Niedermayer
bf85b909f6 bit: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 05:37:27 +02:00
Michael Niedermayer
a5e8492796 bit: set AVPacket.pos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 05:37:22 +02:00
Michael Niedermayer
fa15b1e7b9 bit: loose seekback & wrong bitrate code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 05:33:12 +02:00
Michael Niedermayer
dfc571ff18 bit: rewrite probe
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 05:33:09 +02:00
Michael Niedermayer
21922dc5ae bit: replace assert() by proper check.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 05:31:49 +02:00
Michael Niedermayer
fc9d6035c3 bit: return AVERROR_EOF on eof.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 05:05:03 +02:00
Michael Niedermayer
f2f28861da AMV video encoder.
Authors are Vladimir Voroshilov and Dobrica Pavlinušić based on svn blame/log
For full details of authorship see http://code.google.com/p/amv-codec-tools/

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 04:33:16 +02:00
Laurent Aimar
3b26daedd8 Removed debug message in the probe function of bit demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 00:29:44 +02:00
Michael Niedermayer
eae3cf06a5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flvdec: Fix invalid pointer deferences when parsing index
  configure: disable hardware capabilities ELF section with suncc on Solaris x86
  Use explicit struct initializers for AVCodec declarations.
  Use explicit struct initializers for AVOutputFormat/AVInputFormat declarations.
  adpcmenc: Set bits_per_coded_sample
  adpcmenc: fix QT IMA ADPCM encoder
  adpcmdec: Fix QT IMA ADPCM decoder
  permit decoding of multichannel ADPCM_EA_XAS
  Fix input buffer size check in adpcm_ea decoder.
  fft: avoid a signed overflow
  mpegps: Handle buffer exhaustion when reading packets.

Conflicts:
	libavcodec/adpcm.c
	libavcodec/adpcmenc.c
	libavdevice/alsa-audio-enc.c
	libavformat/flvdec.c
	libavformat/mpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 22:39:52 +02:00
Vladimir Voroshilov
0f2297a9b9 Add .bit (de)muxer 2011-09-24 22:10:46 +02:00
Vladimir Voroshilov
5df643c5df G.729 .bit file demuxer 2011-09-24 21:11:01 +02:00
Michael Niedermayer
fb98b71261 act: remove AVERROR_NOFMT useage.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 21:11:01 +02:00
Vladimir Voroshilov
6080553e6e ACT demuxer 2011-09-24 21:11:01 +02:00
Laurent Aimar
2b4e49d428 flvdec: Fix invalid pointer deferences when parsing index
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-24 18:08:39 +03:00
Diego Biurrun
30b4ee7901 Use explicit struct initializers for AVOutputFormat/AVInputFormat declarations. 2011-09-24 12:11:17 +02:00
Alex Converse
9fba8ebe0a mpegps: Handle buffer exhaustion when reading packets. 2011-09-23 16:36:16 -07:00
Michael Niedermayer
a7758884db Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtp: factorize  dynamic payload type fallback
  flvdec: Ignore the index if it's from a creator known to be different
  cmdutils: move grow_array out of #if CONFIG_AVFILTER
  avconv: actually set InputFile.rate_emu
  ratecontrol: update last_qscale_for sooner
  Fix unnecessary shift with 9/10bit vertical scaling
  prores: mark prores as intra-only in libavformat/utils.c:is_intra_only()
  prores: return more meaningful error values
  prores: improve error message wording
  prores: cosmetics: prettyprinting, drop useless parentheses
  prores: lowercase AVCodec name entry

Conflicts:
	cmdutils.c
	libavcodec/proresdec_lgpl.c
	tests/ref/lavfi/pixfmts_scale

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-24 01:03:07 +02:00
Rafaël Carré
0c378ea1f7 rtp: factorize dynamic payload type fallback
Move the identical code in rtp_write_header() and
ff_sdp_write_media() inside ff_rtp_get_payload_type()

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-09-23 22:00:24 +02:00
Martin Storsjö
bafff1668c flvdec: Ignore the index if it's from a creator known to be different
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-23 20:59:48 +03:00
Michael Niedermayer
3f7dc480c1 psxstr: improve probe to not misdetect so much.
The score of 50 can probably be raised if needed
Fixes Ticket490

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 19:10:55 +02:00
Carl Eugen Hoyos
cab2860c8a Use a colon in the stream description, this matches how -map works now. 2011-09-23 10:16:36 +02:00
Michael Niedermayer
6d789f50d2 flvdec: Inject in stream extradata, into the stream.
The code before was unsafe, had a race condition and could crash.
This Fixes Ticket499

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 06:02:17 +02:00
Robert Krüger
57d5d5f62d Minor documentation clarification regarding AVStream.start_time semantics 2011-09-23 04:21:02 +02:00
Diego Biurrun
5cc2530fc2 prores: mark prores as intra-only in libavformat/utils.c:is_intra_only() 2011-09-23 01:42:14 +02:00
Michael Niedermayer
28d3738428 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Add LATM demuxer
  avplay: flush audio decoder with empty packets at EOF if the decoder has CODEC_CAP_DELAY set.
  8svx/iff: fix decoding of compressed stereo 8svx files.
  8svx: log an error message if output buffer is too small
  8svx: check packet size before reading the initial sample value.
  8svx: output 8-bit samples instead of 16-bit.
  8svx: split delta decoding into a separate function.
  mp4: Don't read an empty Decoder Config Descriptor
  fate.sh: Ignore errors from rm command during cleanup.
  fate.sh: Run git-pull in quiet mode to avoid console spam.
  Apple ProRes decoder
  rtmp: Make the input FLV parser handle data cut at any point
  rv34: Check for invalid slices offsets
  eval: test isnan(sqrt(-1)) instead of just sqrt(-1)

Conflicts:
	Changelog
	libavcodec/8svx.c
	libavcodec/proresdec.c
	libavcodec/version.h
	libavformat/iff.c
	libavformat/version.h
	tests/ref/fate/eval

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-23 00:35:31 +02:00
Aaron Colwell
6c4cc0f640 matroskadec: Fix seeking for matroska files with CUES before first cluster
This change fixes a bug where seeking doesn't work properly for
matroska files that have the CUES element before the first cluster.
This bug was accidentally introduced a few months ago by my deferred CUES
loading patch<http://git.videolan.org/?p=ffmpeg.git;a=commit;h=31ad14c21e0735387ba8082c6e3436241f7ccfc8>
.

When the CUES element appears before the first cluster in the file, the data
is parsed and placed in matroska->index but that data is never added to the
seek index. Currently the transfer from matroska->index to the seek index
only happens when matroska_parse_cues() is called.
Matroska_parse_cues() only gets called on a seek if cues_parsing_deferred is
set. Cues_parsing_deferred only gets set if parsing the CUES requires
seeking past the first cluster. There is no code to handle the case where
CUES is before the first cluster.

This fix essentially restores the matroska->index processing that was
happening at the end of matroska_read_header() before I made my CUES
deferral change. In the case where CUES is before the first
cluster, matroska->index will have data and the seek index will be updated.
In the case where CUES is later in the file, matroska->index will be empty
and cues_parsing_deferred will be set so loading will happen later.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-22 21:34:50 +02:00
Janne Grunau
dcb9f6a20d Add LATM demuxer
This is a raw demuxer for the AAC LATM decoder and thus limited to
single stream LOAS.
2011-09-22 20:39:24 +02:00
Justin Ruggles
1993c6849c 8svx/iff: fix decoding of compressed stereo 8svx files.
Make the iff demuxer send the whole audio chunk to the decoder as a
single packet and move stereo interleaving from the iff demuxer to the
decoder.

Based on a patch by Stefano Sabatini.
git.videolan.org/ffmpeg.git
commit e280a4da2a
2011-09-22 14:11:34 -04:00
Alex Converse
1c2e07b811 mp4: Don't read an empty Decoder Config Descriptor 2011-09-22 10:09:04 -07:00
Michael Niedermayer
e8d8517b16 lavf/utils: only complain about aspect missmatch when the difference is "meassureable"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-22 18:19:00 +02:00
Martin Storsjö
b14629e5ea rtmp: Make the input FLV parser handle data cut at any point
This makes the RTMP writing code able to handle FLV data
fed in arbitrarily small or large chunks, with multiple
consecutive packets in one write call, or having the FLV
packet header split over numerous write calls.

When used in conjunction with the flv muxer, the AVIO buffer
size still needs to be large enough to fit the initial metadata
packet though, since the size of that packet is written with a
seekback.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-22 10:36:16 +03:00
Carl Eugen Hoyos
e71322cb00 Support Sorenson Spark in f4v.
Such files are produced by the Flash Media Server,
see samples/f4v/H263_NM_f.mp4
2011-09-21 23:42:03 +02:00
Carl Eugen Hoyos
d5d027682c Use the parser for AC-3 in mov.
Fixes ticket #494.
2011-09-21 23:42:03 +02:00
Michael Niedermayer
3e1a7ae44a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swfdec: Add support for sample_rate_code 0 (5512 Hz)
  dct-test: factor out some common code and do whas was likely intended
  doc: library versions need to be bumped in version.h
  Revert "ffmpeg: get rid of useless AVInputStream.nb_streams."
  Remove some forgotten AVCodecContext.palctrl usage.
  lavc/utils: move avcodec_init() higher in the file.
  lavc: replace some deprecated FF_*_TYPE with AV_PICTURE_TYPE_*
  ac3dec: actually use drc_scale private option
  lavc: undeprecate AVPALETTE_SIZE and AVPALETTE_COUNT macros
  alsa: add missing header
  msmpeg4: remove leftover unused debug variable declaration
  Fix assert() calls that need updates after FF_COMMON_FRAME macro elimination.
  Fix av_dlog invocations with wrong or missing logging context.
  vf_yadif: add support to yuva420p
  vf_yadif: correct documentation on the parity parameter
  vf_yadif: copy buffer properties like aspect for second frame as well
  oma: support for encrypted files
  id3v2: add support for non-text and GEOB type tag frames
  des: add possibility to calculate DES-CBC-MAC with small buffer

Conflicts:
	ffmpeg.c
	libavcodec/dct-test.c
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-21 21:25:43 +02:00
Alex Converse
05fc9e40a4 swfdec: Add support for sample_rate_code 0 (5512 Hz) 2011-09-21 09:42:35 -07:00
Anton Khirnov
609a2fa1fa Remove some forgotten AVCodecContext.palctrl usage. 2011-09-21 13:51:53 +02:00
Diego Biurrun
35a6855868 Fix av_dlog invocations with wrong or missing logging context.
This fixes build failures with -DDEBUG in CPPFLAGS.
2011-09-21 09:57:32 +02:00
David Goldwich
61f4387d39 oma: support for encrypted files
Signed-off-by: David Goldwich <david.goldwich@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 08:33:15 +02:00
David Goldwich
7a019dffe5 id3v2: add support for non-text and GEOB type tag frames
This extends the ID3v2 parser to allow for reading of non-text (i.e.
other than T***) meta tag frames providing a ff_id3v2_read_all()
function. An additional data structure 'ID3v2ExtraMeta' is introduced
for these tags since AVDictionary is string oriented and unsuitable
for binary data.

A parser for tag frames of type GEOB is implemented, which is needed
to extract keyring information from encrypted OMA files. GEOB data
is parsed into 'ID3v2ExtraMetaGEOB' data structures.

The routine to decode characters from different encodings to UTF-8,
formerly part of the read_ttag() function, is moved to its own
function. Because some tag frames contain subparts of unknown length,
the function is now also able to read until a null character is found.
In addition, the function now takes care of allocating a buffer long
enough to hold the decoded characters.

Signed-off-by: David Goldwich <david.goldwich@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 08:28:21 +02:00
Michael Niedermayer
7cb5def1f3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: Don't blindly skip the 4 trailer bytes from the FLV packets
  rtmp: Handle FLV packets written in more than one write call
  rv34: Check for invalid slice offsets

Conflicts:
	libavformat/rtmpproto.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-21 01:05:36 +02:00
Michael Niedermayer
c83442b057 mp3demux: pass on error code on packet read.
Reported-by: Tanami, Ohad
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-21 00:51:53 +02:00
Martin Storsjö
847052db34 rtspdec: Require TCP-interleaved RTP packets to be at least 11 bytes, instead of 12.
(A minimal RTP packet is 12 bytes, but a minimal RTCP packet can be
much smaller, at least as small as 8 bytes.)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-20 21:58:15 +02:00
Martin Storsjö
3ffe32eb96 rtmp: Don't blindly skip the 4 trailer bytes from the FLV packets
If not enough bytes are available, keep track of them and skip
them on next call.

In practice, if these trailer bytes are written in a separate
call, there is no other data written in this call, making it
fall into the "FLV packet too small" case currently - working,
but not as intended.

This patch makes the code more robust, handling all cases
except for having the FLV packet header split over multiple
write calls.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-20 16:23:48 +03:00
Chiranjeevi Melam
a14c784210 rtmp: Handle FLV packets written in more than one write call
If the FLV packet is larger than the AVIO buffer, a partial
FLV packet will be flushed to the RTMP protocol.

This commit handles the most common cases of FLV packets
being written in more than one call.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-20 16:23:46 +03:00
Michael Niedermayer
cadbe4ecd1 mov: Fix grayscale Cinepak in mov
Fixes Ticket165

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-20 06:19:25 +02:00
Michael Niedermayer
65655a0499 lavf/utils: better dts wrap correction.
Fixes Ticket488

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-20 04:32:46 +02:00
Michael Niedermayer
a6186f3a00 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: fix NULL reference in mov_write_tkhd_tag
  rmdec: Reject invalid deinterleaving parameters
  rv34: Fix potential overreads
  rv34: Fix buffer size used for MC of B frames after a resolution change
  rv34: Avoid NULL dereference on corrupted bitstream
  rv10: Reject slices that does not have the same type as the first one
  vf_yadif: add an option to enable/disable deinterlacing based on src frame "interlaced" flag
  vsrc_color: set output pos values to -1
  vsrc_color: add @file doxy
  vsrc_buffer: remove duplicated file description
  eval: implement not() expression
  eval: add sqrt function for computing the square root
  rmdec: use the deinterleaving mode and not the codec when creating audio packets.
  lavf: Fix context pointer in av_open_input_stream when avformat_open_input fails

Conflicts:
	doc/eval.texi
	doc/filters.texi
	libavcodec/rv10.c
	libavfilter/vsrc_color.c
	libavformat/rmdec.c
	libavutil/avutil.h
	libavutil/eval.c
	tests/ref/fate/eval

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-19 22:45:34 +02:00
Anton Khirnov
c92a2a4eb8 movenc: fix NULL reference in mov_write_tkhd_tag
st may be NULL when there are more mov streams than AVStreams, e.g. when
chapters are present.
2011-09-19 16:44:42 +02:00
Laurent Aimar
f06068bbd6 rmdec: Reject invalid deinterleaving parameters
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-19 15:45:22 +03:00
Laurent Aimar
3e033da847 rmdec: use the deinterleaving mode and not the codec when creating audio packets.
It prevents crashes due to non initialized fields.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-19 12:37:31 +02:00
Carl Eugen Hoyos
4a9b069b67 Support 3IVD in isom, produced by 3ivx DivX Doctor.
Fixes ticket #486.
2011-09-19 12:20:42 +02:00
David Goldwich
63d64228a7 lavf: Fix context pointer in av_open_input_stream when avformat_open_input fails
Signed-off-by: David Goldwich <david.goldwich@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-19 12:03:56 +02:00
Joakim Plate
8e4c10003a Set AV_PKT_FLAG_KEY based on nupplevideo header
Based from lipbmpdemux/nupplevideo.h and from myth NuppelVideoRecorder.cpp
2011-09-18 18:25:44 +02:00
Joakim Plate
7768f6b1b9 add support for generic seeking by reading timestamps in nuv 2011-09-18 18:16:37 +02:00
Chiranjeevi Melam
07631deeee rtmpproto.c: Fixed RTMP Stream output issue
Original code had the assumption of only one FLV packet per RTMP packet. But that assumption is incorrect for higher bit rates. Made changes to the code to accommodate more than one FLV packet per RTMP
+packet.
2011-09-18 06:32:05 +02:00
Arne de Bruijn
b2f230e23d mpegpsdec: fix reading first mpegps packet 2011-09-18 01:57:56 +02:00
Michael Niedermayer
9a9ceb8776 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavfi: add select filter
  oggdec: fix out of bound write in the ogg demuxer
  movenc: create an alternate group for each media type
  lavd: add libcdio-paranoia input device for audio CD grabbing
  rawdec: refactor private option for raw video demuxers
  pcmdec: use unique classes for all pcm demuxers.
  rawdec: g722 is always 1 channel/16kHz

Conflicts:
	Changelog
	configure
	doc/filters.texi
	libavdevice/avdevice.h
	libavfilter/avfilter.h
	libavfilter/vf_select.c
	tests/ref/lavf/mov

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-17 22:36:43 +02:00
Laurent Aimar
0e7efb9d23 oggdec: fix out of bound write in the ogg demuxer
Between ogg_save() and ogg_restore() calls, the number of streams
could have been reduced.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-09-17 09:41:02 -07:00
Laurent Aimar
4907f81358 Reject audio tracks with invalid interleaver parameters in RM demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-17 18:26:53 +02:00
Anton Khirnov
7574cacbd5 movenc: create an alternate group for each media type
Partially fixes bug 44.
2011-09-17 08:42:30 +02:00
Anton Khirnov
85d982f1e2 rawdec: refactor private option for raw video demuxers
pixel_format/video_size only apply to 'rawvideo' (==uncompressed) demuxer
and make no sense for the other raw (== containerless) demuxers. Keep
only the framerate option for those.

Also use unique classes for all raw video demuxers
2011-09-17 06:43:09 +02:00
Anton Khirnov
34d2bf30a0 pcmdec: use unique classes for all pcm demuxers. 2011-09-17 06:42:32 +02:00
Anton Khirnov
d906f49aa8 rawdec: g722 is always 1 channel/16kHz 2011-09-17 06:42:17 +02:00
Michael Niedermayer
5c5306df96 lavf/utils: rewrite real fps calculation code.
The new code is free of biasing to the first timestamps
Fixes fraps.fps.test.zip

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-16 21:29:58 +02:00
Daniel Kristjansson
4460b81f9e 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.
2011-09-16 18:16:30 +02:00
Peter Ross
07a70caba7 Binary text decoder
Decoder and demuxer for various binary text formats.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-16 05:53:14 +02:00
Michael Niedermayer
62101030c4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swscale: fix byte overreads in SSE-optimized hscale().
  matroskadec: fix typo.
  matroskadec: bail on parsing of incorrect seek index segments

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-15 23:10:26 +02:00
Michael Niedermayer
e78d1a594a mpegts: make sure the "standard" code doesnt override the probing with NONE/DATA.
Fixes video stream detection in vid_0x80.ts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-15 23:01:04 +02:00
Laurent Aimar
b59efc9434 Fixed size given to init_get_bits().
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-09-15 13:23:04 -07:00
Ingo Brückl
5d305c9398 Correct determination of file size and frames in VBRI headers
The fields "Number of Bytes" and "Number of Frames" are mixed up. "Bytes"
come first, "Frames" behind.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-15 20:16:55 +02:00
Elvis Presley
5554de13b2 ProRes Decoder
Signed-off-by: Elvis Presley <elvis@e.p>
2011-09-15 15:58:56 +02:00
Dustin Brody
d7d2f0e63c matroskadec: fix typo.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-15 09:34:38 +02:00
Dustin Brody
4a9628f276 matroskadec: bail on parsing of incorrect seek index segments
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-15 09:34:16 +02:00
Michael Niedermayer
3ee83f4605 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavf utils: Remove write-only variable
  lavf utils: Rename shadowing variable
  smacker: fix a few off by 1 errors
  Check for invalid VLC value in smacker decoder.
  Check and propagate errors when VLC trees cannot be built in smacker decoder.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-14 21:57:47 +02:00
Joakim Plate
cdced09ef6 Don't override duration from file header with bitrate duration
This is most noticable on matroska files which has duration
as part of it's header.
2011-09-14 20:08:43 +02:00
Joakim Plate
5d70536804 [yop] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:53:45 +02:00
Joakim Plate
7bcd81299a [wtv] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:53:45 +02:00
Joakim Plate
d9d7174d70 [tta] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:53:45 +02:00
Joakim Plate
fc12f54ea9 [tmv] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:53:45 +02:00
Joakim Plate
425907809b [r3d] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:53:45 +02:00
Joakim Plate
e22155ef0e [nsv] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:53:45 +02:00
Joakim Plate
a3f4fc813d [mxfdec] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:53:45 +02:00
Joakim Plate
88ad79415c [mpc8] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:53:45 +02:00
Joakim Plate
833358172b [jvd] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:53:39 +02:00
Joakim Plate
58540d7bd3 [filmstrip] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:51:07 +02:00
Joakim Plate
928cfc7e4f [ffmdec] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:51:07 +02:00
Joakim Plate
1df00ac80f [dv] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:51:07 +02:00
Joakim Plate
75f418064e [cafdec] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:51:07 +02:00
Joakim Plate
598cc84fbf [bink] Check return value of avio_seek and avoid modifying state if it fails 2011-09-14 19:51:07 +02:00
Alex Converse
940173d4d1 lavf utils: Remove write-only variable 2011-09-14 10:35:46 -07:00
Alex Converse
4439caa482 lavf utils: Rename shadowing variable 2011-09-14 10:35:42 -07:00
elupus
9fa47cb773 make mpegts_get_pcr resync if it's not on a valid mpegts packet 2011-09-14 17:11:23 +02:00
elupus
6214266362 cosmetic reindent of mpegts_get_pcr 2011-09-14 17:11:07 +02:00
elupus
0a90b6a43e check return value of url_fseek in mpegts_get_pcr 2011-09-14 17:10:40 +02:00
elupus
880e83827f respect the maximum position mpegts_get_pcr is allowed to seek to 2011-09-14 17:09:56 +02:00
elupus
2130d2f594 remove unused code in mpegts_get_pcr 2011-09-14 17:08:43 +02:00
Michael Niedermayer
6a507ccfe5 wtvenc: add some asserts because iam paranoid
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-14 01:08:01 +02:00
zhentan feng
438debd095 WTV muxer (2_wtvenc.patch, 3_add_wtv_muxer.patch) 2011-09-14 00:41:25 +02:00
Michael Niedermayer
38670356f9 libavformat/utils: print ts in the "invalid dts/pts combination" case.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-13 06:42:13 +02:00
Laurent Aimar
a92d0fa5d2 Fixed off by one packet size allocation in the smacker demuxer.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-12 23:44:51 +03:00
Laurent Aimar
e055932f56 Check for invalid packet size in the smacker demuxer.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-12 23:43:52 +03:00
Joakim Plate
6c9a24636b asf: only try to read asf index once
This avoid retrying to read ASF index in files for every
attempt to seek. This makes a big difference to protocols
with slow seeking (for example http)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-12 22:12:14 +02:00
Laurent Aimar
c58d45e004 segafilm: Fix potential division by 0 on corrupted segafilm streams in the demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-12 21:45:23 +02:00
Laurent Aimar
7cbe025758 segafilm: Check for memory allocation failures in segafilm demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-12 21:45:07 +02:00
Laurent Aimar
273aab99bf ape demuxer: fix segfault on memory allocation failure.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-12 21:12:31 +02:00
Michael Niedermayer
9765caec1b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  adpcm: split ADPCM encoders and decoders into separate files.
  doc/avconv: fix typo.
  rv34: check that subsequent slices have the same type as first one.
  smacker demuxer: handle possible av_realloc() failure.
  lavfi: add split filter from soc.
  lavfi: add showinfo filter
  libxavs: add private options corresponding to deprecated global options

Conflicts:
	Changelog
	libavcodec/adpcm.c
	libavfilter/avfilter.h
	libavfilter/vf_showinfo.c
	libavfilter/vf_split.c
	libavformat/smacker.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-12 21:01:12 +02:00
Philip de Nier
47886e3644 mxfdec: skip to end of structural sets This fixes reading of partition packs. The code stops reading after the operational pattern and should skip the array of essence container labels that follow 2011-09-12 18:17:49 +02:00
Kostya Shishkov
47a8589f7b smacker demuxer: handle possible av_realloc() failure.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-12 15:51:21 +02:00
Joakim Plate
7e4111cfe2 rmdec: Check return value of more avio_seek calls
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-12 04:39:13 +02:00
Joakim Plate
f9e083a156 avidec: Check return value of more avio_seek calls
The move of avio_seek in avi_read_seek is to avoiding modifying
state if the seek would fail.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-12 04:39:12 +02:00
Joakim Plate
ac1d489320 asf: Check return value of more avio_seek calls
This reduces problems when underlying protocol is not
seekable even if marked as such or if the file has been
cut short.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-12 04:39:12 +02:00
Laurent Aimar
bc851a2946 Fix writes out of bounds in the ogg demuxer.
Between ogg_save() and ogg_restore() calls, the number of streams
could have been reduced.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-12 04:39:12 +02:00
Michael Niedermayer
411cc5c46a Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  audioconvert: add explanatory comments to channel_names array
  audioconvert: K&R whitespace cosmetics
  avconv: use correct index when selecting metadata to write to.
  avconv: fix inverted variable
  doc/avconv: document option types (input/output/per-stream/...)
  doc/avtools-common-opts: write a section about stream specifiers.
  doc/avconv: remove two pointless paragraphs.
  doc/avconv: document that global options should be specified first.
  doc/avconv: remove entries for nonexistent options
  doc/avconv: remove documentation for removed 'timestamp' option
  doc: cosmetics, rename fftools-common-opts to avtools-....
  avconv: move streamid_map to options context.
  avconv: extend -vf syntax
  avconv: move top_field_first to options context.
  avconv: move inter/intra matrix to options context.
  avconv: remove -psnr option.
  avconv: remove me_threshold option.
  avconv: move video_rc_override_string to options context.
  avconv: move frame pixel format to the options context.
  avconv: move frame aspect ratio to the options context.
  ...

Conflicts:
	avconv.c
	cmdutils_common_opts.h
	doc/avconv.texi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-12 00:32:54 +02:00
Laurent Aimar
d0121e8d96 Fixed segfault on corrupted smacker streams in the demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-11 21:19:45 +02:00
Laurent Aimar
1632a576e6 Fixed segfault on memory allocation failure in ape demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-11 21:19:45 +02:00
Joakim Plate
c8ce2b0a1d mpegts: When playing mpegts over rtp/rtsp/sdp, lavf must still read PAT/SDT to get available streams
The code path using for mpegts over rtp doesn't open the demuxer using
mpegts_read_header,
so it never starts listening for PAT/SDT, only uses auto_guess

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-11 20:21:47 +02:00
Joakim Plate
53f8f0a70e Fix for some non interleaved avi files that gets played twice or won't end
This changes so we assume EOF when we can't find the next
streams index entry for non interleaved file.

http://trac.xbmc.org/ticket/5585

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-11 18:21:07 +02:00
Joakim Plate
e42a3dd123 Allow reading of growing avi files (ie currently being written)
This uses the RIFF header stored size to figure out the expected AVI file size, instead
of the actual file. To work fully it requires handling failed avio_seek() instead
of assuming they always succeed.

Some fate file has been cut off and contains half a frame at the end which previously
was not output during demuxing. This frame is now output to encoder, thus fate
diff update.
2011-09-11 17:44:20 +02:00
Georgi Chorbadzhiyski
f1f15c3c1a mpegts: improve error reporting
When reporting continuity error show pid, expected and received cc.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-09-11 09:27:13 -04:00
Aviad Rozenhek
162f1fbc14 mpegts: on seek, reset the cc for all PIDs
Prevent false positive continuity counter error logs.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-09-11 09:26:21 -04:00
Michael Niedermayer
cb66db8010 mpegts: update comment to match code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-11 00:55:16 +02:00
Joakim Plate
6796b82407 libavformat/utils: Only require first packet to be known for all audio and video streams
It can take a long time before subtitles or data streams show up,
so we shouldn't wait for those before assuming we have all info
for streams.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-11 00:33:20 +02:00
Joakim Plate
6d40f88cab mpegts: Some additional HDMV types and reg descriptors for mpegts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-10 22:10:00 +02:00
chinshou
b10ba1175d avisynth: Fix upside down bug 2011-09-10 05:24:39 +02:00
chinshou
4f123a7d7c avisynth: Remove wrong pts calculation.
Fixes Ticket428
2011-09-10 05:24:26 +02:00
Laurent Aimar
e5e0580b93 Fixed size given to init_get_bits().
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-10 00:26:48 +02:00
Wolfram Gloger
6dcbbe34e8 av_interleave_packet_per_dts: switch noninterleaved flushing logic to max dts.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-09 17:19:54 +02:00
Chiranjeevi Melam
8096b7c67f asfenc: fix assert failure on long ffserver runs 2011-09-09 03:34:27 +02:00
Gavin Kinsey
d64066f6e8 Prevent double free of side_data when AVFMT_FLAG_KEEP_SIDE_DATA flag is set 2011-09-08 23:47:23 +02:00
Michael Niedermayer
78d7d8fe91 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Employ FF_ARRAY_ELEMS instead of manually calculating array length.
  Fixed invalid access in wavpack decoder on corrupted bitstream.
  Fixed invalid writes in wavpack decoder on corrupted bitstreams.
  Fixed invalid access in wavpack decoder on corrupted extra bits sub-blocks.
  rtpdec_asf: Fix integer underflow that could allow remote code execution

Conflicts:
	libavformat/rtpdec_asf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-08 22:37:31 +02:00
Yan Jing
8ba987bff3 ffmdec: set avio buffer to ffm->packet_size, avoid dirty reads 2011-09-08 20:53:44 +02:00
Michael Niedermayer
0b99e858d1 ffmdec: fix seeking for non indexed files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-08 20:53:37 +02:00
Yan Jing
59810f8388 ffmdec: handle wrapped file in ffm_seek 2011-09-08 20:09:40 +02:00
Diego Biurrun
6376362d15 Employ FF_ARRAY_ELEMS instead of manually calculating array length. 2011-09-08 15:57:14 +02:00
Carl Eugen Hoyos
f6e99bf514 Add loas as an extension for LOAS/LATM. 2011-09-08 08:24:17 +02:00
Carl Eugen Hoyos
c1fcd7e1ab Support remuxing aac_latm. 2011-09-08 08:22:50 +02:00
zhentan feng
42d4df06e1 WTV muxer (1_extract_wtv_common_code.patch) 2011-09-08 01:55:07 +02:00
Asad Mehmood
bcc531f04a flvdec: Remove AVFMTCTX_NOHEADER if both flags and metadata claim 1 stream
If there is only 1 stream in an flv avformat_find_stream_info will continually
read until probesize is reached. This should stop it reading if the metadata
also claims there to be 1 stream.
2011-09-08 00:26:28 +02:00
Michael Niedermayer
f1b5693027 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Add LATM muxer
  v210enc: clip values according to specifications
  v210enc: switch to PIX_FMT_422P10
  v210dec: switch to PIX_FMT_422P10
  AVOptions: remove AVOption.offset <= 0 checks
  AVOptions: deprecate av_opt_set_defaults2
  AVOptions: move doxy for av_opt_set_defaults() from opt.c to opt.h
  libx264: fix setting some more parameters
  libx264: fix setting the H.264 level
  libx264: add 'direct-pred' private option
  libx264: add 'partitions' private option

Conflicts:
	Changelog
	libavcodec/Makefile
	libavcodec/libx264.c
	libavcodec/v210enc.c
	libavfilter/src_movie.c
	libavformat/version.h
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-07 22:58:39 +02:00
Michael Niedermayer
5ea091fb5a rtpdec_asf: Fix integer underflow that could allow remote code execution
Fixes MSVR-11-0088.
Credit:  Jeong Wook Oh of Microsoft and Microsoft Vulnerability Research (MSVR)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-07 23:33:53 +03:00
Michael Niedermayer
a2b66a366d rtpdec_asf: fix memleak
Based on a suggestion by Ronald S. Bultje
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-07 16:48:49 +02:00
Michael Niedermayer
ba9a7e0d71 rtp: Fix integer underflow that could allow remote code execution.
Fixes MSVR-11-0088
Credit:  Jeong Wook Oh of Microsoft and Microsoft Vulnerability Research (MSVR)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-07 14:59:39 +02:00
Kieran Kunhya
0ca36b4de7 Add LATM muxer
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-09-07 12:57:55 +02:00
Anton Khirnov
9c684feadc libx264: add 'direct-pred' private option
Deprecate AVCodecContext.directpred
2011-09-07 07:27:55 +02:00
Anton Khirnov
0635a8aa21 libx264: add 'partitions' private option
Deprecate AVCodecContext.partitions.
2011-09-07 07:27:18 +02:00
Joseph Wecker
0078430e30 flvdec: A little bit of cleanup 2011-09-07 02:38:57 +02:00
Joseph Wecker
4ee53d7e86 flvenc: Correctly encode data stream into in-band metadata frames. 2011-09-07 02:38:15 +02:00