1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-15 11:28:55 +02:00
Commit Graph

277 Commits

Author SHA1 Message Date
Andreas Cadhalpun
7c24ca1bda nutdec: fix illegal count check in decode_main_header
The existing check has two problems:
 1) i + count can overflow, so that the check '< 256' returns true.
 2) In the (i == 'N') case occurs a j-- so that the loop runs once more.

This can trigger the assertion 'nut->header_len[0] == 0' or cause
segmentation faults or infinite hangs.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-28 22:56:14 +02:00
Andreas Cadhalpun
361702660d nutdec: fix memleaks on error in nut_read_header
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-28 22:38:04 +02:00
Andreas Cadhalpun
3ff1af2b0d nutdec: check chapter creation in decode_info_header
This fixes a segmentation fault when accessing the metadata.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-28 22:22:48 +02:00
Andreas Cadhalpun
6621105877 nutdec: check for negative frame rate in decode_info_header
A negative frame rate triggers an av_assert2 in av_rescale_rnd.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-28 20:37:11 +02:00
Michael Niedermayer
4a10811617 avformat/nutdec: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-30 04:32:58 +02:00
Vittorio Giovara
5a2645cafe nutdec: Prevent leaks on memory error
Bug-Id: CID 205122 / CID 205123
2015-03-12 15:29:59 +00:00
Hugo Beauzée-Luyssen
3035d21b5a nutdec: Check memory allocations
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-17 12:16:43 -05:00
Michael Niedermayer
2924514721 Merge commit '9deaec782810d098bca11c9332fab2d2f4c5fb78'
* commit '9deaec782810d098bca11c9332fab2d2f4c5fb78':
  lavf: move internal fields from public to internal context

Conflicts:
	libavformat/avformat.h
	libavformat/internal.h
	libavformat/mux.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-11 02:47:54 +01:00
wm4
9deaec7828 lavf: move internal fields from public to internal context
This is not an API change; the fields were explicitly declared private
before.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-10 21:45:04 +01:00
Anton Khirnov
05e59135b3 nutdec: do not set has_b_frames
It is not supposed to be set by demuxers.
2014-11-06 09:05:37 +01:00
Michael Niedermayer
42316907b8 Merge commit 'af7ca6ea124b82b337a6b96e10963e88eba57ebe'
* commit 'af7ca6ea124b82b337a6b96e10963e88eba57ebe':
  nutdec: check av_new_packet return value

Conflicts:
	libavformat/nutdec.c

See: bb502411dd
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-22 00:26:37 +02:00
Vittorio Giovara
af7ca6ea12 nutdec: check av_new_packet return value
CC: libav-stable@libav.org
Bug-Id: CID 733713
2014-10-21 14:37:48 +01:00
Michael Niedermayer
5753d96771 Merge commit '96bfb677478514db73d1b63b4213c97ad4269e8f'
* commit '96bfb677478514db73d1b63b4213c97ad4269e8f':
  nutdec: Prevent a memory corruption

Conflicts:
	libavformat/nutdec.c

See: 05dd5368a9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-20 22:35:37 +02:00
Luca Barbato
96bfb67747 nutdec: Prevent a memory corruption
Chapters do not have an event_flags field.

Bug-Id: CID 1231990
2014-10-20 10:47:03 +01:00
Michael Niedermayer
05dd5368a9 avformat/nutdec: always initialize event_flags
Fixes: CID1231990

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-20 16:45:08 +02:00
Michael Niedermayer
1110a030c7 Merge commit 'fa3a5dd4dea34baa6bb2f7fe6006fc4b2888f2aa'
* commit 'fa3a5dd4dea34baa6bb2f7fe6006fc4b2888f2aa':
  nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 23:44:53 +02:00
Andrew Stone
fa3a5dd4de nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:23:36 +00:00
James Almer
d34ec64a22 replace calls to url_feof() with avio_feof()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-08 00:48:38 +02:00
Michael Niedermayer
a26ecba075 Merge commit '52a1c32c0a86e84d43f977c5148e62975a0c6917'
* commit '52a1c32c0a86e84d43f977c5148e62975a0c6917':
  nut: Use nut->version in the version range check

Conflicts:
	libavformat/nutdec.c

Note, this bug did not affect ffmpeg
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-08 21:18:36 +02:00
Luca Barbato
52a1c32c0a nut: Use nut->version in the version range check
It was wrongly left unchanged when the version field had been
introduced. (c94e2e85cb)
2014-07-08 19:04:09 +02:00
Michael Niedermayer
a981d1b6aa avformat/nutdec: if all else fails try to lookup video tag in isom
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-08 16:37:06 +02:00
Michael Niedermayer
74bd039f8c avformat/nutdec: improve probe speed by 30%
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-24 18:40:40 +02:00
Michael Niedermayer
6b041cb617 avformat/nutdec: Fix handling of older 4.0 files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 01:48:02 +02:00
Michael Niedermayer
a8499cbbe8 Merge commit 'c94e2e85cb6af8a570d8542a830556243bd32873'
* commit 'c94e2e85cb6af8a570d8542a830556243bd32873':
  nut: Support experimental NUT 4 features

Conflicts:
	doc/nut.texi
	libavformat/nut.h
	libavformat/nutdec.c
	libavformat/nutenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 01:13:59 +02:00
Luca Barbato
c94e2e85cb nut: Support experimental NUT 4 features
Add the low overhead pipe mode and the extended broadcast mode.
Export the options as 'syncponts' since it impacts only that.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-05-28 22:04:56 +02:00
Michael Niedermayer
968516cebf avformat/nut: add ff_nut_audio_extra_tags to demuxer too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-09 23:37:55 +02:00
Michael Niedermayer
7f9697aa11 avformat/nutdec: fix packet end clearing
The code was buggy, using the wrong variable, also it missed the case
where the packet become smaller due to sidedata/metadata being extracted
which left a few bytes uninitialized

Fixes use of uninitialized memory
Fixed: msan_uninit-mem_7f6abbe44530_6838_mewmew_vorbis_ssa.nut
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-10 00:34:15 +01:00
Michael Niedermayer
71fe97a60a avformat/nutdec: check avio_read() return code
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f2785ab8669_6838_mewmew_vorbis_ssa.nut
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 00:26:33 +01:00
Michael Niedermayer
d04aceb7d0 avformat/nutdec: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 17:27:23 +01:00
Michael Niedermayer
8113e838a8 avformat/nut: add support for per frame side & meta data with version 4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 14:13:31 +01:00
Michael Niedermayer
0cedc6c066 avformat/nutdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer
804ea14b35 avformat/nut: add minor_version field with version>=4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 02:03:19 +01:00
Michael Niedermayer
6aa50374bf avformat/nut: store version in the context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 02:03:08 +01:00
Derek Buitenhuis
b1fcdc08ce nut: Fix unchecked allocations
CC: libav-stable@libav.org
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-22 17:09:56 +01:00
Derek Buitenhuis
55ae13e3de nut: Fix unchecked allocations
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-10-22 17:08:10 +01:00
Paul B Mahol
a807c68253 avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-13 20:13:38 +00:00
Paul B Mahol
269845db86 avformat/nutdec: check for allocation failures
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-11 15:04:08 +00:00
Michael Niedermayer
7f25050289 nutdec: use ff_find_last_ts()
Fixes finding the duration for nut files that are truncated

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-06 22:27:35 +02:00
Michael Niedermayer
9818bbde53 Merge commit 'e0c53c3408181d2e7d544eb65fc7355a79438dfe'
* commit 'e0c53c3408181d2e7d544eb65fc7355a79438dfe':
  nut: use meaningful error values
  FATE: use a less ambiguous end time for filter-trim-time test

Conflicts:
	libavformat/nutdec.c
	tests/fate/filter-video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-08 12:47:54 +02:00
Luca Barbato
e0c53c3408 nut: use meaningful error values
Fix the mispresented EINVAL for EOF on partial files, among the other.
2013-05-07 14:37:32 +02:00
Michael Niedermayer
77c85cbd9d Merge commit '46c1917350f58dfab84e41919e6c02d43950db8c'
* commit '46c1917350f58dfab84e41919e6c02d43950db8c':
  nut: use a define for the nut version
  bgmc: Do not mark ff_bgmc_decode_init() as av_cold

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-06 10:41:43 +02:00
Luca Barbato
46c1917350 nut: use a define for the nut version
Ease switching version in the future and make evident why that value.
2013-05-06 09:14:43 +02:00
Michael Niedermayer
fd68371b07 nutdec: Implement duration parsing for indexed nuts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-02 18:57:29 +02:00
Michael Niedermayer
9bb54bb685 nutdec: more specific return codes for decode_syncpoint()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-04 16:51:21 +01:00
Michael Niedermayer
7ccc0ed6a0 nutdec: print error on invalid/unsupported fourcc style
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-04 16:49:17 +01:00
Diego Biurrun
d8c772de53 nutdec: Always return a value from nut_read_timestamp()
The function is a callback that is called by ff_gen_search with
a constant stream index.

Avoid a false positive on older gcc version.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-15 02:15:09 +01:00
Michael Niedermayer
ebfb738fa4 nutdec: sanity check r_frame_rate
This fixes files that store a somewhat incorrect value.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-18 14:03:04 +01:00
Michael Niedermayer
076300bf8b Merge commit 'bfe5454cd238b16e7977085f880205229103eccb'
* commit 'bfe5454cd238b16e7977085f880205229103eccb':
  lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.h
  lavf: move "MP3 " fourcc from riff to nut
  fate: vpx: Add dependencies
  fate: Fix wavpack-matroskamode test dependencies
  x86: dsputilenc: port to cpuflags

Conflicts:
	libavformat/internal.h
	libavformat/nut.c
	tests/fate/vpx.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-29 13:45:57 +01:00
Justin Ruggles
bfe5454cd2 lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.h 2012-11-28 11:18:49 -05:00
Michael Niedermayer
cd37963684 Merge commit '381dc1a5ec0925b281c573457c413ae643567086'
* commit '381dc1a5ec0925b281c573457c413ae643567086':
  fate: ac3: Place E-AC-3 tests and AC-3 tests in different groups
  fate: Add shorthands for acodec PCM and ADPCM tests
  avconv: Drop unused function argument from do_video_stats()
  cmdutils: Conditionally compile libswscale-related bits
  aacenc: Drop some unused function arguments
  rtsp: Avoid a cast when calling strtol
  nut: support textual data
  nutenc: verbosely report unsupported negative pts

Conflicts:
	cmdutils.c
	ffmpeg.c
	libavformat/nut.c
	libavformat/nutenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-30 13:52:03 +01:00
Luca Barbato
d4bff9f1ab nut: support textual data
Plain text (utf8 encoded) data can be muxed and demuxed in nut.
2012-10-29 12:03:28 +01:00
Michael Niedermayer
73581afe01 nutdec: fix integer overflow
Fixes CID700575
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 20:45:32 +02:00
Paul B Mahol
bb502411dd nutdec: check return value of av_new_packet()
Fixes CID733173.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-15 17:03:41 +00:00
Michael Niedermayer
82c0055c5e Merge commit 'b5198a2637b7b45b0049a1d4b386a06f016f2520'
* commit 'b5198a2637b7b45b0049a1d4b386a06f016f2520':
  configure: tms470: add mapping for -mfpu=vfpv3-d16 flag
  configure: recognise Minix as OS
  configure: work around bug in ash shell
  eval-test: make table static const
  lavr: handle clipping in the float to s32 conversion
  nut: support pcm codecs not mapped in avi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 14:46:13 +02:00
Michael Niedermayer
db51c65961 Merge commit '1bd442c276e6688b43777a198cad0d7e3a92123f'
* commit '1bd442c276e6688b43777a198cad0d7e3a92123f':
  nut: prioritize native tags

Conflicts:
	tests/ref/lavfi/crop
	tests/ref/lavfi/crop_scale
	tests/ref/lavfi/crop_scale_vflip
	tests/ref/lavfi/crop_vflip
	tests/ref/lavfi/null
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_crop
	tests/ref/lavfi/pixfmts_hflip
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_pad
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip
	tests/ref/lavfi/scale200
	tests/ref/lavfi/scale500
	tests/ref/lavfi/vflip
	tests/ref/lavfi/vflip_crop
	tests/ref/lavfi/vflip_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 14:31:55 +02:00
Luca Barbato
1bd442c276 nut: prioritize native tags
Use native tags instead of avi ones, simplifies a lot raw video codecs
handling.
2012-10-13 12:33:18 +02:00
Luca Barbato
92281850a2 nut: support pcm codecs not mapped in avi
The native tags will be used when available.
2012-10-13 12:33:18 +02:00
Michael Niedermayer
032ba74ed2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ARM: fix Thumb PIC on Apple
  nut: add do {} while (0) to GET_V
  tiffenc: Check av_malloc() results.
  tiffenc: Simplify pixel format setup using AVPixFmtDescriptor.
  Use atexit() instead of defining a custom exit_program() interface.
  msvc: Fix detection of VFW & Avisynth required libs

Conflicts:
	ffmpeg.c
	ffmpeg_opt.c
	ffplay.c
	ffprobe.c
	ffserver.c
	libavcodec/tiffenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-02 19:48:54 +02:00
Luca Barbato
72d30b2792 nut: add do {} while (0) to GET_V
Make it consistent with the other function-like macros.
2012-10-02 12:16:47 +02:00
Michael Niedermayer
e3fb5bc147 nut: store and read the r_frame_rate
With this, when we use a finer timebase than neccessary to store
durations the demuxer still knows what the original timebase was.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-02 01:09:12 +02:00
Michael Niedermayer
c402d36afa nutdec: fix get_vb_trace() / -DTRACE compile
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 14:21:53 +02:00
Michael Niedermayer
e760424ddd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  nutdec: const correctness for get_v_trace/get_s_trace function arguments
  truemotion2: Request samples for old TM2 headers
  rtpdec: Remove a useless ff_ prefix from a static symbol
  rtpdec: Support depacketizing speex
  rtpenc: Add support for packetizing speex

Conflicts:
	libavformat/rtpdec.c
	libavformat/sdp.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-27 14:29:03 +02:00
Diego Biurrun
83655442fa nutdec: Remove unused and broken debug function stub 2012-09-27 12:02:33 +02:00
Diego Biurrun
93e81ee81c nutdec: const correctness for get_v_trace/get_s_trace function arguments 2012-09-26 19:10:13 +02:00
Michael Niedermayer
fb96ac469a nutdec: fix mixup of nb_streams and timebase_count
Fixes out of array read, should fix ffprove fate failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-21 06:29:24 +02:00
Michael Niedermayer
6ab1166c77 nutdec: fix type of intermediate variable for ts calculation.
Prior to this it could theoretically become negative and read
out of array.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-21 06:27:38 +02:00
Carl Eugen Hoyos
73b40dafc8 Use correct format identifier for uint64_t. 2012-08-27 09:14:40 +02:00
Michael Niedermayer
e6a045ba56 nutdec: Flip the direction for seeking with an index in the failure case.
This is closer to how seeking works without an index

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-26 22:15:18 +02:00
Michael Niedermayer
cebbaf578d nutdec: improve information in error message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-26 22:15:18 +02:00
Michael Niedermayer
7a72695c05 Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85':
  Replace all CODEC_ID_* with AV_CODEC_ID_*
  lavc: add AV prefix to codec ids.

Conflicts:
	doc/APIchanges
	doc/examples/decoding_encoding.c
	doc/examples/muxing.c
	ffmpeg.c
	ffprobe.c
	ffserver.c
	libavcodec/8svx.c
	libavcodec/avcodec.h
	libavcodec/dnxhd_parser.c
	libavcodec/dvdsubdec.c
	libavcodec/error_resilience.c
	libavcodec/h263dec.c
	libavcodec/libvorbisenc.c
	libavcodec/mjpeg_parser.c
	libavcodec/mjpegenc.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pcm.c
	libavcodec/r210dec.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/version.h
	libavdevice/alsa-audio-dec.c
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavformat/asfdec.c
	libavformat/asfenc.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/caf.c
	libavformat/electronicarts.c
	libavformat/flacdec.c
	libavformat/flvdec.c
	libavformat/flvenc.c
	libavformat/framecrcenc.c
	libavformat/img2.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/ipmovie.c
	libavformat/isom.c
	libavformat/matroska.c
	libavformat/matroskadec.c
	libavformat/matroskaenc.c
	libavformat/mov.c
	libavformat/movenc.c
	libavformat/mp3dec.c
	libavformat/mpeg.c
	libavformat/mpegts.c
	libavformat/mxf.c
	libavformat/mxfdec.c
	libavformat/mxfenc.c
	libavformat/nsvdec.c
	libavformat/nut.c
	libavformat/oggenc.c
	libavformat/pmpdec.c
	libavformat/rawdec.c
	libavformat/rawenc.c
	libavformat/riff.c
	libavformat/sdp.c
	libavformat/utils.c
	libavformat/vocenc.c
	libavformat/wtv.c
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-07 22:45:46 +02:00
Anton Khirnov
36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Michael Niedermayer
b5da7d4c1a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avformat: Drop pointless "format" from container long names
  swscale: bury one more piece of inline asm under HAVE_INLINE_ASM.
  wv: K&R formatting cosmetics
  configure: Add missing descriptions to help output
  h264_ps: declare array of colorspace strings on its own line.
  fate: amix: specify f32 sample format for comparison
  tiny_psnr: support 32-bit float samples
  eamad/eatgq/eatqi: call special EA IDCT directly
  eamad: remove use of MpegEncContext
  mpegvideo: remove unnecessary inclusions of faandct.h
  af_asyncts: avoid overflow in out_size with large delta values
  af_asyncts: add first_pts option

Conflicts:
	configure
	libavcodec/eamad.c
	libavcodec/h264_ps.c
	libavformat/crcenc.c
	libavformat/ffmdec.c
	libavformat/ffmenc.c
	libavformat/framecrcenc.c
	libavformat/md5enc.c
	libavformat/nutdec.c
	libavformat/rawenc.c
	libavformat/yuv4mpeg.c
	tests/tiny_psnr.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-30 23:28:31 +02:00
Diego Biurrun
6774247a9d avformat: Drop pointless "format" from container long names 2012-07-30 13:59:06 +02:00
Michael Niedermayer
ac2d3b0f6e nutdec: set duration_estimation_method
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-30 18:58:52 +02:00
Michael Niedermayer
3233ad4b44 nutdec: estimate duration from last syncpoint
Previously nut used the fallback of estimation by bitrate.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-30 17:22:37 +02:00
Michael Niedermayer
e2c95e6bd8 nutdec: remove assert that is wrong for some new duration code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-30 17:22:37 +02:00
Michael Niedermayer
9d230ba924 nutdec: check that filesize is valid before using it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-30 17:22:37 +02:00
Michael Bradshaw
1f3f7bd444 Add AVFMT_SEEK_TO_PTS to nut demuxer flags
Signed-off-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-16 03:13:35 +02:00
Reimar Döffinger
370211f470 nutdec: minor simplification.
Also fixes an (incorrect) "control reaches end of non-void function"
warning with some compilers.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-29 13:03:15 +02:00
Reimar Döffinger
1d128e5814 nutdec: replace assert with av_assert0.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-29 13:03:15 +02:00
Michael Niedermayer
2a976debc1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dv: Initialize encoder tables during encoder init.
  dv: Replace some magic numbers by the appropriate #define.
  FATE: pass the decoded output format and audio source file to enc_dec_pcm
  FATE: specify the input format when decoding in enc_dec_pcm()
  x86inc: support AVX abstraction for 2-operand instructions
  configure: detect PGI compiler and set suitable flags
  avconv: check for an incompatible changing channel layout
  avio: make AVIOContext.av_class pointer to const
  nutdec: add malloc check and fix const to non-const conversion warnings

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 21:23:52 +02:00
Mans Rullgard
9d72c0527c nutdec: add malloc check and fix const to non-const conversion warnings
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-18 23:54:20 +01:00
Michael Niedermayer
4f6df20a00 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avplay: Don't free video filters string until the end of decoding.
  movenc: small refactor mov_write_packet
  movenc: remove redundant check
  interplayvideo: fix av_dlog parameter type mismatch
  Drop some pointless #ifdefs.

Conflicts:
	libavcodec/interplayvideo.c
	libavcodec/libxvidff.c
	libavcodec/snowenc.c
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-11 22:50:22 +02:00
Michael Niedermayer
e387c9d5dd Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  rv40dsp x86: use only one register, for both increment and loop counter
  rv40dsp: implement prescaled versions for biweight.
  avconv: use default channel layouts when they are unknown
  avconv: parse channel layout string
  nutdec: K&R formatting cosmetics
  vda: Signal 4 byte NAL headers to the decoder regardless of what's in the extradata
  mem: Consistently return NULL for av_malloc(0)
  vf_overlay: implement poll_frame()
  vf_scale: support named constants for sws flags.
  lavc doxy: add all installed headers to doxy groups.
  lavc doxy: add avfft to the main lavc group.
  lavc doxy: add remaining avcodec.h functions to a misc doxygen group.
  lavc doxy: add AVPicture functions to a doxy group.
  lavc doxy: add resampling functions to a doxy group.
  lavc doxy: replace \ with /
  lavc doxy: add encoding functions to a doxy group.
  lavc doxy: add decoding functions to a doxy group.
  lavc doxy: fix formatting of AV_PKT_DATA_{PARAM_CHANGE,H263_MB_INFO}
  lavc doxy: add AVPacket-related stuff to a separate doxy group.
  lavc doxy: add core functions/definitions to a doxy group.
  ...

Conflicts:
	ffmpeg.c
	libavcodec/avcodec.h
	libavcodec/vda.c
	libavcodec/x86/rv40dsp.asm
	libavfilter/vf_scale.c
	libavformat/nutdec.c
	libavutil/mem.c
	tests/ref/acodec/pcm_s24daud

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-10 22:53:25 +02:00
Diego Biurrun
679481b3b6 Drop some pointless #ifdefs.
The files are only compiled if the #ifdef conditions are met.
2012-04-10 19:27:38 +02:00
Asen Lekov
a559d65c07 nutdec: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-10 14:57:47 +02:00
Michael Niedermayer
2e0c360abd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  cosmetics: Align muxer/demuxer declarations
  mpeg12: Do not change frame_pred_frame_dct flag and demote error into a warning
  avcodec: remove avcodec_guess_channel_layout()
  avutil: Add av_get_default_channel_layout()

Conflicts:
	doc/APIchanges
	libavcodec/mpeg12.c
	libavformat/cdg.c
	libavformat/matroskaenc.c
	libavformat/mpegts.c
	libavformat/nuv.c
	libavformat/wav.c
	libavutil/audioconvert.c
	libavutil/audioconvert.h
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-06 22:52:01 +02:00
Martin Storsjö
20234a4bd7 cosmetics: Align muxer/demuxer declarations
Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.

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

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-28 07:53:34 +01:00
Anton Khirnov
6e9651d106 lavf: remove AVFormatParameters from AVFormatContext.read_header signature 2012-01-27 10:51:57 +01:00
Michael Niedermayer
9d76cf0b18 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec: Templatize the code for different g726 bitrate variants
  rv40: move loop filter to rv34dsp context
  lavf: make av_set_pts_info private.
  rtpdec: Add support for G726 audio
  rtpdec: Add an init function that can do custom codec context initialization
  avconv: make copy_tb on by default.
  matroskadec: don't set codec timebase.
  rmdec: don't set codec timebase.
  avconv: compute next_pts from input packet duration when possible.
  lavf: estimate frame duration from r_frame_rate.
  avconv: update InputStream.pts in the streamcopy case.

Conflicts:
	avconv.c
	libavdevice/alsa-audio-dec.c
	libavdevice/bktr.c
	libavdevice/fbdev.c
	libavdevice/libdc1394.c
	libavdevice/oss_audio.c
	libavdevice/v4l.c
	libavdevice/v4l2.c
	libavdevice/vfwcap.c
	libavdevice/x11grab.c
	libavformat/au.c
	libavformat/eacdata.c
	libavformat/flvdec.c
	libavformat/mpegts.c
	libavformat/mxfenc.c
	libavformat/rtpdec_g726.c
	libavformat/wtv.c
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-01 02:54:24 +01:00
Anton Khirnov
c3f9ebf743 lavf: make av_set_pts_info private.
It's supposed to be called only from (de)muxers.
2011-11-30 20:34:45 +01:00
Reimar Döffinger
bb3244dee2 Replace all usage of strcasecmp/strncasecmp
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.

Instead use our own implementations that always treat the data
as ASCII.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:57 +02:00
Reimar Döffinger
96949dafcc Replace all strcasecmp/strncasecmp usages.
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-03 19:25:26 +01:00
Michael Niedermayer
6faf0a21e1 Merge remote-tracking branch 'qatar/master'
* qatar/master: (53 commits)
  probe: Restore identification of files with very large id3 tags and no extension.
  probe: Remove id3 tag presence as a criteria to do file extension checking.
  mpegts: MP4 SL support
  mpegts: MP4 OD support
  mpegts: Add support for Sections in PMT
  mpegts: Replace the MP4 descriptor parser with a recursive parser.
  mpegts: Add support for multiple mp4 descriptors
  mpegts: Parse mpeg2 SL descriptors.
  isom: Add MPEG4SYSTEMS dummy object type indication.
  aacdec: allow output reconfiguration on channel changes
  nellymoserenc: take float input samples instead of int16
  nellymoserdec: use dsp functions for overlap and windowing
  nellymoserdec: do not fail if there is extra data in the packet
  nellymoserdec: fail if output buffer is too small
  nellymoserdec: remove pointless buffer size check.
  lavf: add init_put_byte() to the list of visible symbols.
  seek-test: free options dictionary after use
  snow: do not draw_edge if emu_edge is set
  tools/pktdumper: update to recent avformat api
  seek-test: update to recent avformat api
  ...

Conflicts:
	doc/APIchanges
	libavcodec/mpegaudiodec.c
	libavcodec/nellymoserdec.c
	libavcodec/snow.c
	libavcodec/version.h
	libavcodec/wmadec.c
	libavformat/avformat.h
	libavformat/mpegts.c
	libavformat/mxfdec.c
	libavformat/utils.c
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-29 02:08:54 +02:00
Anton Khirnov
a2faa95151 lavf: make some seeking functions private
Specifically av_update_cur_dts(), av_seek_frame_binary() and
av_gen_search().

They are not supposed to be called outside lavf.
2011-10-28 09:23:24 +02:00
Michael Niedermayer
dd8ffc1925 Merge remote-tracking branch 'qatar/master'
* qatar/master: (47 commits)
  lavc: hide private symbols.
  lavc: deprecate img_get_alpha_info().
  lavc: use avpriv_ prefix for ff_toupper4.
  lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.
  lavc: use avpriv_ prefix for ff_ac3_parse_header.
  lavc: use avpriv_ prefix for ff_frame_rate_tab.
  lavc: rename ff_find_start_code to avpriv_mpv_find_start_code
  lavc: use avpriv_ prefix for ff_split_xiph_headers.
  lavc: use avpriv_ prefix for ff_dirac_parse_sequence_header.
  lavc: use avpriv_ prefix for some dv symbols used in lavf.
  lavc: use avpriv_ prefix for some flac symbols used in lavf.
  lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.
  lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.
  lavc: use avpriv_ prefix for ff_aac_parse_header().
  lavf: hide private symbols.
  lavf: use avpriv_ prefix for some dv functions.
  lavf: use avpriv_ prefix for ff_new_chapter().
  avcodec: add CODEC_CAP_DELAY note to avcodec_decode_audio3() documentation
  avcodec: clarify the CODEC_CAP_DELAY note in avcodec_decode_video2()
  avcodec: clarify documentation of CODEC_CAP_DELAY
  ...

Conflicts:
	configure
	doc/general.texi
	libavcodec/Makefile
	libavcodec/aacdec.c
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/dv.c
	libavcodec/dvdata.c
	libavcodec/dvdata.h
	libavcodec/libspeexenc.c
	libavcodec/mpegvideo.c
	libavcodec/version.h
	libavformat/avidec.c
	libavformat/dv.c
	libavformat/dv.h
	libavformat/flvenc.c
	libavformat/mov.c
	libavformat/mp3enc.c
	libavformat/oggparsespeex.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-21 02:01:26 +02:00
Anton Khirnov
1fa395e471 lavf: use avpriv_ prefix for ff_new_chapter().
It's used in libavdevice.
2011-10-20 20:57:23 +02:00
Michael Niedermayer
d0492578c8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  presets: rename presets directory
  lavc: make avcodec_get_context_defaults3 "officially" public
  lavf: replace av_new_stream->avformat_new_stream part II.
  lavf,lavd: replace av_new_stream->avformat_new_stream part I.
  lavf: add avformat_new_stream as a replacement for av_new_stream.
  Use correct scaling table for bwd-pred MVs in second B-field
  Ut Video decoder
  Makefile: change presets extension to .avpreset
  lavfi: add rgbtestsrc source, ported from MPlayer libmpcodecs
  lavfi: add testsrc source
  AVOptions: add documentation.
  presets: update libx264 ffpresets

Conflicts:
	Changelog
	doc/APIchanges
	doc/ffmpeg.texi
	ffpresets/libx264-ipod320.ffpreset
	ffpresets/libx264-ipod640.ffpreset
	ffserver.c
	libavcodec/avcodec.h
	libavcodec/options.c
	libavcodec/version.h
	libavdevice/libdc1394.c
	libavfilter/avfilter.h
	libavfilter/vsrc_testsrc.c
	libavformat/flvdec.c
	libavformat/riff.c
	libavformat/version.h
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-20 02:34:51 +02:00
Anton Khirnov
84ad31ff18 lavf: replace av_new_stream->avformat_new_stream part II.
Manual replacements are done in this commit.

In many cases, the id is some constant made up number (e.g. 0 for video
and 1 for audio), which is then not used in the demuxer for anything.
Those ids are removed.
2011-10-19 17:02:11 +02:00