Commit Graph

290 Commits

Author SHA1 Message Date
Michael Niedermayer efb5fa79f5 Merge remote branch 'qatar/master'
* qatar/master: (37 commits)
  In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function.
  lavc: remove reference to opt.h from Makefile.
  prefer avio_check() over url_exist()
  avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
  lavu: remove misc disabled cruft
  lavu: remove FF_API_OLD_IMAGE_NAMES cruft
NOT PULLED  lavu: remove FF_API_OLD_EVAL_NAMES cruft
  lavc: remove misc disabled cruft.
  lavc: remove the FF_API_INOFFICIAL cruft.
  lavc: remove the FF_API_SET_STRING_OLD cruft.
  lavc: remove the FF_API_USE_LPC cruft.
  lavc: remove the FF_API_SUBTITLE_OLD cruft.
  lavc: remove the FF_API_VIDEO_OLD cruft.
  lavc: remove the FF_API_AUDIO_OLD cruft.
  lavc: remove the FF_API_OPT_SHOW cruft.
  lavc: remove the FF_API_MM_FLAGS cruft.
  lavf: remove misc disabled cruft.
  lavf: remove FF_API_INDEX_BUILT cruft
  lavf: remove FF_API_URL_CLASS cruft.
  lavf: remove FF_API_SYMVER cruft
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-20 04:48:23 +02:00
Stefano Sabatini 59d96941f0 avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.

This breaks API.
2011-04-19 19:47:58 +02:00
Michael Niedermayer 85b2114759 Merge commit 'a3a0af4fb1237bed0af75868073f9a63db8b1864'
* commit 'a3a0af4fb1237bed0af75868073f9a63db8b1864':
  avutil: make aes and sha api public
  handle malloc failures in ff_get_wav_header
  add xWMA demuxer
  mpegts: force the default timebase
  libavcodec: Bump micro after adding the dtx AVOptions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-15 04:50:06 +02:00
Max Horn ca402f32e3 handle malloc failures in ff_get_wav_header
ff_get_wav_header is reading data from a WAVE file and then uses it
(without validation) to malloc a buffer. It then proceeded to read
data into the buffer, without verifying that the allocation succeeded.

To address this, change ff_get_wav_header to return an error if
allocation failed, and adapted all calling code to handle that error.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-04-14 13:56:09 +02:00
Michael Niedermayer c88caa522c Merge remote branch 'qatar/master'
* qatar/master:
  proto: include os_support.h in network.h
  matroskaenc: don't write an empty Cues element.
  lavc: add a FF_API_REQUEST_CHANNELS deprecation macro
  avio: move extern url_interrupt_cb declaration from avio.h to url.h
  avio: make av_register_protocol2 internal.
  avio: avio_ prefix for url_set_interrupt_cb.
  avio: AVIO_ prefixes for URL_ open flags.
  proto: introduce listen option in tcp
  doc: clarify configure features
  proto: factor ff_network_wait_fd and use it on udp

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 02:50:13 +02:00
Anton Khirnov f87b1b373a avio: AVIO_ prefixes for URL_ open flags. 2011-04-07 18:07:16 +02:00
Michael Niedermayer 2cae9809e2 Merge remote branch 'qatar/master'
* qatar/master:
  fate: fix partial run when no samples path is specified
  ARM: NEON fixed-point forward MDCT
  ARM: NEON fixed-point FFT
  lavf: bump minor version and add an APIChanges entry for avio changes
  avio: simplify url_open_dyn_buf_internal by using avio_alloc_context()
  avio: make url_fdopen internal.
  avio: make url_open_dyn_packet_buf internal.
  avio: avio_ prefix for url_close_dyn_buf
  avio: avio_ prefix for url_open_dyn_buf
  avio: introduce an AVIOContext.seekable field
  ac3enc: use generic fixed-point mdct
  lavfi: add fade filter
  Change yadif to not use out of picture lines.
  lavc: deprecate AVCodecContext.antialias_algo
  lavc: mark mb_qmin/mb_qmax for removal on next major bump.

Conflicts:
	doc/filters.texi
	libavcodec/ac3enc_fixed.h
	libavcodec/ac3enc_float.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/vf_fade.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-04 02:15:12 +02:00
Anton Khirnov 8978fedaee avio: introduce an AVIOContext.seekable field
Use it instead of url_is_streamed and AVIOContext.is_streamed.
2011-04-03 22:46:40 +02:00
Michael Niedermayer 1c0a472630 Revert "matroskadec: set default duration for simple block"
This reverts commit 98a7d560b4.
This has been implemented differently by aurel already
2011-03-25 12:00:17 +01:00
Michael Niedermayer 797ef671dd Merge remote-tracking branch 'newdev/master'
* newdev/master:
  matroskadec: set default duration for simple block
  When building for MinGW32 disable strict ANSI compliancy.
  ARM: fix ff_apply_window_int16_neon() prototype
  configure: check for --as-needed support early
  ARM: NEON optimised apply_window_int16()
  ac3enc: NEON optimised shift functions
  ac3enc: NEON optimised ac3_max_msb_abs_int16 and ac3_exponent_min
  mpeg12.c: fix slice threading for mpeg2 field picture mode.
  ffmetadec.c: fix compiler warnings.
  configure: Don't explicitly disable ffplay or in/outdevices on dos
  configure: Remove the explicit disabling of ffserver
  configure: Add fork as a dependency to ffserver

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-25 02:57:41 +01:00
John Stebbins 98a7d560b4 matroskadec: set default duration for simple block
When a normal Block is parsed, duration is initialized to
AV_NOPTS_VALUE.  If it is not changed, then the track's default
duration is used.  But for SimpleBlock, duration is initialized to
0 instead of AV_NOPTS_VALUE.  This is due to the difference in how
EBML_NEST vs EBML_PASS are processed.  Setting duration to 0 leads
eventually to wrongly estimate the frame duration in util.c

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-03-25 00:34:18 +01:00
Aurelien Jacobs 2851b1f656 matroskadec: check that pointers were initialized before accessing them
fix ticket #14

Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
2011-03-24 00:29:25 +01:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Michael Niedermayer 0fecf2642b Merge remote-tracking branch 'newdev/master'
Conflicts:
	Changelog
	doc/APIchanges
	doc/optimization.txt
	libavformat/avio.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-17 17:22:52 +01:00
Anton Khirnov 45a8a02a41 lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes sense
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:24:51 -04:00
Aurelien Jacobs 6f1260f870 matroskadec: set a default duration also for packets comming from a simple block 2011-03-16 23:37:16 +01:00
Anton Khirnov 66e5b1df36 avio: deprecate url_feof
AVIOContext.eof_reached should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 17:20:31 -05:00
Reimar Döffinger b09e506820 Make matroska demuxer also set timestamps for RealAudio packets.
Improves seeking in ffplay with
http://samples.mplayerhq.hu/Matroska/RA_missing_timestamps.mkv
2011-03-05 12:48:39 +01:00
Anton Khirnov 384c9c2fa7 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a2704c9712)
2011-03-05 02:29:31 +01:00
Anton Khirnov a2704c9712 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:57 -05:00
Anton Khirnov 74b3f67c9c lavf: replace all uses of url_fskip with avio_seek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e356fc57a2)
2011-03-03 14:15:08 +01:00
Anton Khirnov f59d8ff8cd avio: avio_ prefix for url_fseek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6b4aa5dac8)
2011-03-03 14:15:03 +01:00
Anton Khirnov e356fc57a2 lavf: replace all uses of url_fskip with avio_seek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 12:22:16 -05:00
Anton Khirnov 6b4aa5dac8 avio: avio_ prefix for url_fseek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 12:12:33 -05:00
Anton Khirnov e9eb8d0bce avio: avio: avio_ prefixes for put_* functions
In the name of consistency:
put_byte           -> avio_w8
put_<type>         -> avio_w<type>
put_buffer         -> avio_write

put_nbyte will be made private
put_tag will be merged with avio_put_str

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 77eb5504d3)
2011-02-22 02:44:38 +01:00
Anton Khirnov e63a362857 avio: avio_ prefixes for get_* functions
In the name of consistency:
get_byte           -> avio_r8
get_<type>         -> avio_r<type>
get_buffer         -> avio_read

get_partial_buffer will be made private later

get_strz is left out becase I want to change it later to return
something useful.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b7effd4e83)
2011-02-22 02:44:37 +01:00
Anton Khirnov 77eb5504d3 avio: avio: avio_ prefixes for put_* functions
In the name of consistency:
put_byte           -> avio_w8
put_<type>         -> avio_w<type>
put_buffer         -> avio_write

put_nbyte will be made private
put_tag will be merged with avio_put_str

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 14:25:15 -05:00
Anton Khirnov b7effd4e83 avio: avio_ prefixes for get_* functions
In the name of consistency:
get_byte           -> avio_r8
get_<type>         -> avio_r<type>
get_buffer         -> avio_read

get_partial_buffer will be made private later

get_strz is left out becase I want to change it later to return
something useful.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 11:23:22 -05:00
Anton Khirnov ae99313aa5 avio: move init_put_byte() to a new private header and rename it
init_put_byte should never be used outside of lavf, since
sizeof(AVIOContext) isn't part of public ABI.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e731b8d872)
2011-02-20 19:05:47 +01:00
Anton Khirnov 471fe57e1a avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ae628ec1fd)
2011-02-20 19:05:47 +01:00
Anton Khirnov e731b8d872 avio: move init_put_byte() to a new private header and rename it
init_put_byte should never be used outside of lavf, since
sizeof(AVIOContext) isn't part of public ABI.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-20 08:37:31 -05:00
Anton Khirnov ae628ec1fd avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-20 08:37:15 -05:00
Reimar Döffinger 14d735bd4f matroskadec: add generic element length validation.
This validate the length of a mkv element directly after reading
it.
This has the advantage that it is easy to add new limits and makes
it less likely to forget to add checks and also avoids issues like
bits of the length value above the first 32 being ignored because
the parsing functions only takes an int.
Previously discussed in the "mkv 0-byte integer parsing" thread.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 95ec3d4cac)
2011-02-09 03:31:17 +01:00
Reimar Döffinger 95ec3d4cac matroskadec: add generic element length validation.
This validate the length of a mkv element directly after reading
it.
This has the advantage that it is easy to add new limits and makes
it less likely to forget to add checks and also avoids issues like
bits of the length value above the first 32 being ignored because
the parsing functions only takes an int.
Previously discussed in the "mkv 0-byte integer parsing" thread.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 21:36:53 -05:00
Diego Elio Pettenò 66355be3c3 Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
(cherry picked from commit c6610a216e)
2011-01-28 03:15:34 +01:00
Diego Elio Pettenò c6610a216e Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
2011-01-26 22:10:09 +00:00
Anton Khirnov bf800c7db8 matroskadec: skip invalid tags with no TagName
fixes segfault in issue 2328

Originally committed as revision 25659 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 06:29:04 +00:00
Anton Khirnov ad7768f4c4 add ff_ prefix to metadata_conv()
patch by Anton Khirnov  anton _at_ khirnov _dot_ net

Originally committed as revision 25505 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 13:20:41 +00:00
Anton Khirnov 03700d399b Export metadata in the generic format. Deprecate old conversion API.
patch by Anton Khirnov  anton _at_ khirnov _dot_ net

Originally committed as revision 25493 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-15 19:04:25 +00:00
Reimar Döffinger 1b4d327b1c Add a special function to mkv demxuer to parse length values that includes
special-case code to handle all possible encodings of "unknown length".

Originally committed as revision 25049 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-06 17:51:44 +00:00
Aurelien Jacobs 4a194c8f47 matroskadec: allow uint and float elements with length = 0
Originally committed as revision 25044 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-05 21:37:40 +00:00
Reimar Döffinger ff6a5fc1f0 Optimize/simplify ebml_read_num.
Originally committed as revision 25026 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-02 19:17:46 +00:00
Aurelien Jacobs e110e968fe matroskadec: minor simplification
patch from reimar

Originally committed as revision 24804 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-17 14:25:14 +00:00
Aurelien Jacobs 4f90688b6e matroskadec: fix integer overflow
patch from reimar

Originally committed as revision 24803 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-17 14:05:23 +00:00
Alex Converse f7cf0f3148 Add WebM to the Matroska demuxer name.
Originally committed as revision 24639 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-01 00:30:37 +00:00
David Conrad 41c1ccc332 matroskadec: merge only SSA packets together
fixes issue 2052
patch by David Conrad

Originally committed as revision 24004 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-02 16:41:38 +00:00
Aurelien Jacobs 7a617a8634 add AV_DISPOSITION_FORCED flag and use it in matroska demuxer
Originally committed as revision 24003 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-02 16:38:44 +00:00
Aurelien Jacobs 0ade7bb6e9 matroskadec : propagate AVERROR to the caller
based on a patch by Jai Menon

Originally committed as revision 23619 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-15 19:53:15 +00:00
Aurelien Jacobs bddd1d93e5 matroskadec: fix type of the length field in ebml_read_master()
Also use the correct value for unknown size (instead of a truncated
and sign extended value).

Originally committed as revision 23591 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-11 17:16:43 +00:00
Aurelien Jacobs 739178107c matroskadec: cosmetic: indentation
Originally committed as revision 23590 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-11 16:45:38 +00:00