Commit Graph

8328 Commits

Author SHA1 Message Date
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
Joseph Wecker
4c05042978 flvdec: Properly decoding in-band metadata packets as data frames. 2011-09-07 02:38:13 +02:00
Joseph Wecker
c054f11606 flvdec: Started to remove most of the "only 1-audio+1-video" assumptions 2011-09-07 02:36:42 +02:00
Joseph Wecker
30bcd6a945 flv: Ammon's changes migrated from 0.6.0 - I believe for the android broadcaster. 2011-09-07 02:02:03 +02:00
Carl Eugen Hoyos
b5d4c0e26e Support Speex in isom.
Adobe Flash Media Server produces such files although the f4v
specification does not allow Speex (nor Nellymoser).
2011-09-07 01:10:14 +02:00
Michael Niedermayer
9243454e31 libavformat/utils: only run delta_dts_min calculation code when its value is used.
This should improve speed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-07 00:23:18 +02:00
Michael Niedermayer
effbeff503 libavformat/utils: use FFMIN() where possible
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-07 00:13:09 +02:00
wg
37ed5df5c5 libavformat/utils: Treat subtitle streams as noninterleaved when 20 seconds have passed without a packet
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-07 00:10:44 +02:00
Michael Niedermayer
d2084402e6 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: fix type for thread_type option
  avconv: move format to options context
  avconv: move limit_filesize to options context
  avconv: move start_time, recording_time and input_ts_offset to options context
  avconv: add a context for options.
  cmdutils: allow storing per-stream/chapter/.... options in a generic way
  cmdutils: split per-option code out of parse_options().
  cmdutils: add support for caller-provided option context.
  cmdutils: declare only one pointer type in OptionDef
  cmdutils: move grow_array() from avconv to cmdutils.
  cmdutils: move exit_program() declaration to cmdutils from avconv
  http: Consider the stream as seekable if the reply contains Accept-Ranges: bytes
  nutenc: add namespace to the api facing functions

Conflicts:
	avconv.c
	cmdutils.c
	cmdutils.h
	ffmpeg.c
	ffplay.c
	ffprobe.c
	ffserver.c
	libavformat/http.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-05 03:10:45 +02:00
Stefan Fritsch
346ea9e222 http: Consider the stream as seekable if the reply contains Accept-Ranges: bytes
The initial request contains "Range: 0-", which servers normally
have responded with "HTTP/1.1 206 Partial Content" reply with
a Content-Range header, which was used as indicator for seekability.

Apache, since 2.2.20, responds with "HTTP/1.1 200 OK" for these
requests, which is more friendly to caches and proxies, but the
seekability still is indicated via the Accept-Ranges: bytes header.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-04 11:28:53 +02:00
Luca Barbato
5ee5dc4e9a nutenc: add namespace to the api facing functions
Rename write_{header,packet,trailer} to nut_write_{header,packet,trailer}
in order to make easier debugging them.
2011-09-04 11:09:06 +02:00
Michael Niedermayer
1889c6724a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  AVOptions: fix av_set_string3() doxy to match reality.
  cmdutils: get rid of dummy contexts for examining AVOptions.
  lavf,lavc,sws: add {avcodec,avformat,sws}_get_class() functions.
  AVOptions: add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find().
  cpu detection: avoid a signed overflow

Conflicts:
	avconv.c
	cmdutils.c
	doc/APIchanges
	ffmpeg.c
	libavcodec/options.c
	libavcodec/version.h
	libavformat/version.h
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-04 04:11:53 +02:00
Stefan Fritsch
31dfc49598 http: Fix decetion of range support in HTTP servers
currently libavformat only allows seeking if a request with "Range:
0-" results in a 206 reply from the HTTP server which includes a
Content-Range header. But according to RFC 2616, the server may also
reply with a normal 200 reply (which is more efficient for a request
for the whole file). In fact Apache HTTPD 2.2.20 has changed the
behaviour in this way and it looks like this change will be kept in
future versions. The fix for libavformat is easy: Also look at the
Accept-Ranges header.
2011-09-03 22:29:07 +02:00
Anton Khirnov
fb4ca26bdb lavf,lavc,sws: add {avcodec,avformat,sws}_get_class() functions. 2011-09-03 20:53:35 +02:00
Anton Khirnov
c11fb8288d AVOptions: add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find().
It allows to search for options only with AVClass, without allocating
the corresponding context.
2011-09-03 20:52:21 +02:00
Tomas Härdin
9289eada91 Parse MXF partitions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-02 20:40:54 +02:00
Clément Bœsch
3dd2c8bbbc wav: init st to NULL to avoid a false-positive warning.
If st is NULL, it means no 'fmt ' tag is found, but 'data' tag (which
needs a previous 'fmt ' tag to be parsed correctly and st initialized)
check will make sure st is never dereferenced in that case.
2011-09-01 20:23:40 +02:00
Diego Biurrun
aebb56e184 Replace some commented-out debug printf() / av_log() messages with av_dlog().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-01 01:31:03 +02:00
Carl Eugen Hoyos
a9424d27c4 Support speex in avi. 2011-08-30 23:45:39 +02:00
Carl Eugen Hoyos
c41bf905f4 Only autodetect loas in transport streams.
The Makito encoder sets stream type 0x11 for AAC.
This patch should be reverted if it breaks decoding valid streams (and
the problem can't be fixed in the probe function).
2011-08-30 10:46:51 +02:00
Carl Eugen Hoyos
75a225217c Support Nellymoser in isom. 2011-08-30 10:46:51 +02:00
Baptiste Coudurier
f33be93b1b mov: read tmcd tag and set timecode drop flag accordingly. 2011-08-30 09:14:05 +02:00
Michael Niedermayer
db5effe1a4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Revert "h264: Properly set coded_{width, height} when parsing H.264."
  isom: add missing AVC-Intra tags, rearrange list and update comments
  avconv: remove stubs of crop* and pad* options
  avconv: re-add nb_streams to InputFile.

Conflicts:
	avconv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-29 22:24:01 +02:00
Tomas Härdin
8b7222979c isom: add missing AVC-Intra tags, rearrange list and update comments
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-29 16:48:39 +02:00
Carl Eugen Hoyos
312645e030 Do not set codec_tag property for matroska muxers.
Fixes ticket #8.
2011-08-28 23:13:17 +02:00
Carl Eugen Hoyos
262ab1c59a Do not assume timestamps for mp2 format. 2011-08-28 21:43:04 +02:00
Michael Niedermayer
3dd44e5075 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Use deinterleavers for demangling audio packets in RealMedia.
  vf_scale: don't leak SWS context.
  doxygen: drop another pointless star from pointer variable name

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-28 00:15:05 +02:00
Fredrik Axelsson
09a858da7d Add support for BDAV/m2ts-mode muxing
Signed-off-by: Fredrik Axelsson <fraxbe@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-27 23:57:24 +02:00
Reimar Döffinger
056c13fd17 vocdec: Take channel count into account when calculating bit rate.
Fixes trac issue #343.

Carl Eugen Hoyos actually made a patch first, but I missed it because
trac does not send notification emails when an attachment is added.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-08-27 22:12:51 +02:00
Marton Balint
dacd827b81 Rename find_program_from_stream to av_find_program_from_stream and add it to avformat.h
Also extend the functionality to use the last found program to start the search
after that program.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-27 22:06:09 +02:00
Michael Niedermayer
941bb552c6 Fix memory corruption in case of memory allocation failure in av_probe_input_buffer()
Reported-by: Tanami Ohad
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-27 21:39:52 +02:00
Kostya Shishkov
10397215aa Use deinterleavers for demangling audio packets in RealMedia.
Unlike other containers RealMedia stores its audio packets in scrambled form,
with interleaver ID preceeding audio codec ID. Currently deinterleaving
decision is tied to the codec while it's possible to have non-default
deinterleaver with audio codec (like Int0 deinterleaver instead of specific
one for Sipro).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-27 17:23:45 +02:00
Michael Niedermayer
094a496818 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fifo: add FIFO API test program, and fate test
  fifo: add av_fifo_peek2(), and deprecate av_fifo_peek()
  postprocess.c: filter name needs to be double 0 terminated
  doxygen: fix wrong comment syntax, //< vs. ///<
  doxygen: drop pointless star from pointer variable names
  Replace deprecated av_find_stream_info() by avformat_find_stream_info().
  xmv: eliminate superfluous zeroing of zero data
  configure: fix typo in avconv dependency list

Conflicts:
	configure
	doc/APIchanges
	libavutil/Makefile
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-26 23:18:54 +02:00
Stefano Sabatini
f2011ed234 fifo: add av_fifo_peek2(), and deprecate av_fifo_peek()
The new function provides a more generic interface than av_fifo_peek()
for peeking at a FIFO buffer data.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-26 20:53:02 +02:00
Diego Biurrun
c960e67ad0 Replace deprecated av_find_stream_info() by avformat_find_stream_info(). 2011-08-26 17:40:07 +02:00
Sven Hesse
5f677aac76 xmv: eliminate superfluous zeroing of zero data
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-26 16:26:57 +02:00
Michael Niedermayer
876d1d796b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vp6: partially propagate huffman tree building errors during coeff model parsing and fix misspelling
  mpeg12: propagate chunk decode errors and fix conditional indentation
  vc1: fix VC-1 Pulldown handling.
  VC1: Fix first/last row checks with slices
  mp4: Handle non-trivial ES Descriptors.
  vc1: properly zero coded_block[] edges on new slice entry.

Conflicts:
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-26 01:29:40 +02:00
Michael Niedermayer
7c4e4c6a06 udp: fix circular buffer error handling
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-25 21:43:30 +02:00
Michael Niedermayer
20f0bf8cfb udp: buffer datagrams in circular buffer instead of a bytestream
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-25 21:33:54 +02:00
Alex Converse
ad6c7c1b52 mp4: Handle non-trivial ES Descriptors. 2011-08-25 11:53:21 -07:00
Michael Niedermayer
7e7012d0b4 oggdec: subtract time of first packet only from duration when it is significant
this fixes accuracy with normal ogg files while keeping support for ogg files
starting at times different from 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-24 23:20:09 +02:00
Michael Niedermayer
d2cab951e3 oggdec: Make sure start time correction is applied once to each stream
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-24 23:13:57 +02:00
Michael Niedermayer
bd4640375e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: Replace goto redo on decode fail with continue.
  avconv: Remove dead store.
  libx264: add 'crf_max' private option.
  libx264: add 'weightp' private option.
  libx264: add 'rc_lookahead' private option.
  libx264: add 'psy_trellis' private option.
  libx264: add 'psy_rd' private option.
  libx264: add 'aq_strength' private option.
  libx264: add 'aq_mode' private option.
  libx264: add 'cqp' private option.
  libx264: add 'crf' private option.
  lavc: remove vbv_delay option
  lavf utils: Fix bad indentation.
  avconv: use av_clip_int16 for audio clipping

Conflicts:
	libavcodec/libx264.c
	libavcodec/options.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-24 20:26:48 +02:00
Alex Converse
7e6029f98a lavf utils: Fix bad indentation. 2011-08-23 09:53:23 -07:00
Michael Niedermayer
4ca6a151e0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: print the codecs names in the stream mapping.
  avconv: move the avcodec_find_decoder() call to add_input_streams().
  Windows Media Image decoder (WMVP/WVP2)
  ac3enc: remove outdated TODO comment for apply_channel_coupling()

Conflicts:
	Changelog
	libavcodec/avcodec.h
	libavcodec/vc1dec.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-23 18:26:37 +02:00
Alberto Delmás
45ecda8554 Windows Media Image decoder (WMVP/WVP2)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-23 11:18:35 +02:00
Michael Niedermayer
124deea1a0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libx264: only use ABR mode when the user explicitly set bitrate.
  libx264: use medium preset by default.
  mp2 encoder: make 128k the default bitrate.
  movenc: use libx264 by default when possible for mov, mp4 and psp
  avienc: saner default audio codec.
  matroskaenc: saner default codecs.
  avplay: add examples of how to specify size/pixel format through private options
  lavc: add A|E|D flags to "ac" and "ar" options

Conflicts:
	doc/ffplay.texi
	libavcodec/libx264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-22 15:00:53 +02:00
Nicolas George
aeba058340 lavf: warn when a parser is needed and not found. 2011-08-22 12:13:27 +02:00
Nicolas George
355ac7ff6c rtpenc: use avcodec_get_name to report unsupported codecs. 2011-08-22 12:13:27 +02:00
Nicolas George
1c58264e62 flvenc: use avcodec_get_name to report unsupported codecs. 2011-08-22 12:13:27 +02:00
Carl Eugen Hoyos
05a267305d Support more codecs when muxing caf. 2011-08-22 09:35:58 +02:00
Anton Khirnov
fb42d156ed movenc: use libx264 by default when possible for mov, mp4 and psp 2011-08-22 07:17:35 +02:00
Anton Khirnov
b71389cbae avienc: saner default audio codec.
libmp3lame if available, ac3 otherwise.
2011-08-22 07:17:19 +02:00
Anton Khirnov
3436c4a368 matroskaenc: saner default codecs.
libvorbis/libx264 for video if available, otherwise ac3/mpeg4.
2011-08-22 07:16:55 +02:00
Michael Niedermayer
ff96098084 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  WavPack demuxer: do not rely on index when timestamp is not in indexed range.
  WavPack demuxer: store position of the first block in index.
  WavPack decoder: implement flush function
  avconv: Separate initialization from the main transcode loop.

Conflicts:
	avconv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-21 15:27:02 +02:00
Carl Eugen Hoyos
ef25e70de3 Stream-copying PureVoice into caf works fine. 2011-08-21 14:52:48 +02:00
Kostya Shishkov
ccb919e34b WavPack demuxer: do not rely on index when timestamp is not in indexed range.
This fixes the situation when there are not enough entries in the index
(e.g. on initial seek there's only one index entry in the index) and index
search returns just the last known entry. That causes seeking function just to
seek there instead of trying harder to get at the requested position.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-08-21 12:55:17 +02:00
Kostya Shishkov
5561fe487f WavPack demuxer: store position of the first block in index.
Currently for multichannel audio position for the last block position is
stored in index (and used for seeking), which is obviously not correct.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-08-21 12:54:35 +02:00
Carl Eugen Hoyos
7bdc5de33d Autodetect LOAS in transport streams.
Fixes ticket 365.
2011-08-20 00:27:54 +02:00
Carl Eugen Hoyos
47818b2a67 Add LOAS demuxer. 2011-08-20 00:27:38 +02:00
Sven Hesse
8ea6157d83 xmv: Read the video packet data first, then swap its bytes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-18 23:56:12 +02:00
Sven Hesse
c062aa8deb xmv: Remove superfluous zeroing of already zero'd data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-18 23:54:17 +02:00
Sven Hesse
730333efc4 xmv: Add some doxygen comments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-18 23:54:08 +02:00
Sven Hesse
6fb501245d xmv: Merge XMVAudioTrack into XMVAudioPacket
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-18 23:53:44 +02:00
Sven Hesse
d50fc62ea2 xmv: Make the various offset variables uint64_t
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-18 23:52:52 +02:00
Michael Niedermayer
909e0fe243 xmv: fix license header to match patch
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-18 23:32:51 +02:00
Michael Niedermayer
edae3dbf1d Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits)
  h264: hide reference frame errors unless requested
  swscale: split hScale() function pointer into h[cy]Scale().
  Move clipd macros to x86util.asm.
  avconv: reindent.
  avconv: rescue poor abused start_time global.
  avconv: rescue poor abused recording_time global.
  avconv: merge two loops in output_packet().
  avconv: fix broken indentation.
  avconv: get rid of the arbitrary MAX_FILES limit.
  avconv: get rid of the output_streams_for_file vs. ost_table schizophrenia
  avconv: add a wrapper for output AVFormatContexts and merge output_opts into it
  avconv: make itsscale syntax consistent with other options.
  avconv: factor out adding input streams.
  avconv: Factorize combining auto vsync with format.
  avconv: Factorize video resampling.
  avconv: Don't unnecessarily convert ipts to a double.
  ffmpeg: remove unsed variable nopts
  RV3/4 parser: remove unused variable 'off'
  add XMV demuxer
  rmdec: parse FPS in RealMedia properly
  ...

Conflicts:
	avconv.c
	libavformat/version.h
	libswscale/swscale.c
	tests/ref/fate/lmlm4-demux

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-18 10:56:08 +02:00
Aurelien Jacobs
dc6c36ce46 matroskadec: use correct compression parameters for current track CodecPrivate 2011-08-18 00:21:21 +02:00
Sven Hesse
c6c6c1aaa6 add XMV demuxer
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-17 15:04:37 +02:00
Kostya Shishkov
a43b1e74e2 rmdec: parse FPS in RealMedia properly
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-17 15:00:42 +02:00
Kostya Shishkov
48ce8b8da7 Use parsers for RealVideo 3/4 to determine correct PTS
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-17 15:00:42 +02:00
Kostya Shishkov
7c1f6df4b5 rmdec: correct DTS calculation in RealMedia container.
First, container stores only DTS and not PTS as it was believed.
Second, multiple frames in a packet store timestamp instead of position
after the frame length.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-17 15:00:42 +02:00
Michael Niedermayer
27fbe31c92 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Revert "avconv: use stream copy by default when possible."
  avconv: print stream copy information.
  avconv: use stream copy by default when possible.
  matroskaenc: vertical alignment.
  matroskaenc: implement query_codec()
  lavf: add avformat_query_codec().
  lavc: add avcodec_get_type() for mapping codec_id -> type.
  flvenc: use int64_t to store offsets
  avconv: don't segfault on 0 input files.
  Do not write ID3v1 tags by default
  mpegts: log into an AVFormatContext rather than MpegTSContext.

Conflicts:
	doc/APIchanges
	libavcodec/version.h
	libavformat/avformat.h
	libavformat/mp3enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-17 14:23:20 +02:00
Michael Niedermayer
41bf67d8d4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: change AV_LOG_INFO to AV_LOG_WARNING for some warnings
  avconv: remove a write-only variable
  avconv: remove pointless parameter from new_*_stream().
  avconv: cosmetics, move code
  avconv: cosmetics -- move copy_chapters().
  avconv: cosmetics -- move parse_forced_key_frames().
  lavc: add audio flag to the 'b' option, deprecate 'ab'.
  avconv: rename sameq to same_quant
  doc/avconv: add forgotten end of chapter.
  Changelog: document avconv incompatibilities with ffmpeg.
  avconv: replace -vcodec/-acodec/-scodec with a better system.
  avconv: remove presets.
  svq3: propagate codec memory allocation failure in context init

Conflicts:
	Changelog
	avconv.c
	libavcodec/options.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-16 23:47:35 +02:00
Anton Khirnov
a3f2f766af matroskaenc: vertical alignment. 2011-08-16 20:24:20 +02:00
Anton Khirnov
15c14ce6b2 matroskaenc: implement query_codec() 2011-08-16 20:24:20 +02:00
Anton Khirnov
48f9e457ea lavf: add avformat_query_codec().
It allows to check if a given codec can be written into a container.
2011-08-16 20:24:20 +02:00
Luca Barbato
7f5bf4fbaf flvenc: use int64_t to store offsets
Metadata currently is written only at the start of the file in normal
cases, when transcoding from a rtmp source metadata could be
written later and the offset recorded can exceed 32bit.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-16 20:24:20 +02:00
Diogo Franco
f1f298cd32 Do not write ID3v1 tags by default
ID3v1 are legacy tags with several limitations; furthermore
avconv/ffmpeg writes the tags in UTF-8 which probably has near-0
software support.

Add a -write_id3v1 option to be able to turn it on; disabled by default.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-16 20:24:20 +02:00
Alex Converse
d8b999e2d0 mpegts: log into an AVFormatContext rather than MpegTSContext.
MpegTSContext's AVClass member can be NULL.
2011-08-16 11:09:39 -07:00
Anton Khirnov
eb97dbb05a movenc: change AV_LOG_INFO to AV_LOG_WARNING for some warnings 2011-08-16 10:34:17 +02:00
Michael Niedermayer
1a34478b71 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Fix NASM include directive
  dsputil_mmx: Honor HAVE_AMD3DNOW
  lavf,lavd: remove all usage of AVFormatParameters from demuxers.
  jack: add 'channels' private option.
  VC-1: fix reading of custom PAR.
  Remove redundant and dubious video codec detection by its extradata
  mpeg12: remove repeat-field code disabled since May 2002
  patch checklist: suggest fate instead of regression tests
  Turn on resampling on sudden size change instead of bailing out during recode.
  avtools: reinitialise filter chain when input video stream changes dimensions

Conflicts:
	Makefile
	avconv.c
	doc/developer.texi
	ffplay.c
	libavcodec/x86/dsputil_mmx.c
	libavdevice/libdc1394.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-15 23:35:53 +02:00
Anton Khirnov
c14fe6bc99 lavf,lavd: remove all usage of AVFormatParameters from demuxers.
AVFormatParameters are converted into corresponding private options in
av_open_input_file/stream() compat wrappers, so accessing them from
demuxers is redundant.
2011-08-15 19:59:48 +02:00
Kostya Shishkov
e9fb763611 Remove redundant and dubious video codec detection by its extradata
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-08-15 14:03:01 +02:00
Baptiste Coudurier
1c967827d2 mxf: H.264/MPEG-4 AVC Intra support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-15 00:40:54 +02:00
Stefano Sabatini
323b930699 fifo: add av_fifo_peek2(), and deprecate av_fifo_peek()
The new function provides a more flexible interface for peeking at a
FIFO buffer data.
2011-08-14 01:56:28 +02:00
Reimar Döffinger
eb8b325202 Support streaming .au files.
FFmpeg writes data_size as AU_UNKNOWN_SIZE, make demuxer not
fail when data_size is set to this value.
Should fix trac issue #394.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-08-14 00:05:36 +02:00
Clément Bœsch
75af0e6a16 dv: honor timecode in DV muxer.
This is based on the original work by Baptiste Coudurier.
2011-08-13 19:13:03 +02:00
Clément Bœsch
b49fe589ea mxf: honor timecode drop flag in mxf muxer if set. 2011-08-13 19:13:02 +02:00
Clément Bœsch
b33ca05b46 mxf: add cli option in mxfenc to replace GOP timecode parsing.
This is based on the original work by Baptiste Coudurier.
2011-08-13 19:13:02 +02:00
Clément Bœsch
4c3c6e60f9 mxf: move framenum to timecode convert to timecode helpers.
This is based on the original work by Baptiste Coudurier.
2011-08-13 19:13:02 +02:00
Thierry Foucu
1892052f8d mov: Set negative Sample_duration in STTS to 1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-13 03:39:58 +02:00
Michael Niedermayer
0cb233cf46 Merge commit 'b2c087871dafc7d030b2d48457ddff597dfd4925'
* commit 'b2c087871dafc7d030b2d48457ddff597dfd4925':
  Move x86util.asm from libavcodec/ to libavutil/.
  Move x86inc.asm to libavutil/.
  APIchanges: note error_recognition in lavf
  lavf: add support for error_recognition, use it in avidec, and bump minor API version
  avconv: change semantics of -map
  avconv: get rid of new* options.
  cmdutils: allow precisely specifying a stream for AVOptions.
  configure: add missing CFLAGS to fix building on the HURD
  libx264: Include hint for possible values for configuring libx264
  cmdutils: allow ':'-separated modifiers in option names.
  avconv: make -map_metadata work consistently with the other options
  avconv: remove deprecated options.
  avconv: make -map_chapters accept only the input file index.
  Make a copy of ffmpeg under a new name -- avconv.
  ffmpeg: add a warning stating that the program is deprecated.
  Add weighted motion compensation for RV40 B-frames
  RV3/4: calculate B-frame motion weights once per frame
  Move RV3/4-specific DSP functions into their own context
  mjpeg: propagate decode errors from ff_mjpeg_decode_sos and ff_mjpeg_decode_dqt
  h264: notice memory allocation failure

Conflicts:
	.gitignore
	Makefile
	cmdutils.c
	configure
	doc/ffplay.texi
	doc/ffprobe.texi
	doc/ffserver.texi
	libavcodec/libx264.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/version.h
	tests/lavf-regression.sh
	tests/lavfi-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-13 02:56:08 +02:00
Dustin Brody
2f63440c59 lavf: add support for error_recognition, use it in avidec, and bump minor API version
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-12 19:10:22 +02:00
Clément Bœsch
9acffed9e0 oggenc: add missing initializer braces to shut up gcc warning.
This fixes the warning:
    libavformat/oggenc.c:75:7: warning: missing braces around initializer [-Wmissing-braces]
2011-08-10 21:03:39 +02:00
Clément Bœsch
df2039f573 avidec: add missing initializer braces to shut up gcc warning.
This fixes the warning:
    libavformat/avidec.c:81:5: warning: missing braces around initializer [-Wmissing-braces]
2011-08-10 21:02:32 +02:00