Commit Graph

1399 Commits

Author SHA1 Message Date
Michael Niedermayer ee23dcf534 avformat_free_context: allow NULL as argument
Fixes CID703682
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 20:13:18 +02:00
Michael Niedermayer 901f4bb6fc utils: consider mpeg4 in mp4/mov to have a unreliable timebase
Partly fixes Ticket1664

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-16 01:04:02 +02:00
Michael Niedermayer 45bd0d15f4 lavf: fix fps detection with PAFF H.264
Fixes Ticket1065
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 19:20:23 +02:00
Michael Niedermayer 120b38b966 avio: redesign ffio_rewind_with_probe_data()
This prevents a double free

Fixes CID718285
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 02:08:59 +02:00
Michael Niedermayer 59cbedfc3d update_initial_timestamps: increase pts_buffer size
Fixes CID733786
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 00:08:28 +02:00
Michael Niedermayer 317505b566 lavf: do not prematurely accept a format with low score in init_input()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-10 21:41:20 +02:00
Michael Niedermayer 94f5470a20 lavf: add a AVPROBE_SCORE_RETRY instead of using hardcoded values.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-10 21:39:19 +02:00
Michael Niedermayer eadba3e94d Merge commit 'cbcd497f384f0f8ef3f76f85b29b644b900d6b9f'
* commit 'cbcd497f384f0f8ef3f76f85b29b644b900d6b9f':
  adxdec: use planar sample format
  adpcmdec: use planar sample format for adpcm_thp
  adpcmdec: use planar sample format for adpcm_ea_xas
  adpcmdec: use planar sample format for adpcm_ea_r1/r2/r3
  adpcmdec: use planar sample format for adpcm_xa
  adpcmdec: use planar sample format for adpcm_ima_ws for vqa version 3
  adpcmdec: use planar sample format for adpcm_4xm
  adpcmdec: use planar sample format for adpcm_ima_wav
  adpcmdec: use planar sample format for adpcm_ima_qt
  pcmdec: use planar sample format for pcm_lxf
  mace: use planar sample format
  atrac1: use planar sample format
  build: non-x86: Only compile mpegvideo optimizations when necessary
  rtpdec_mpeg4: au_headers is a single array, simple av_free is enough
  avcodec: free extended_data instead address of it
  fate: Add tests of the ff_make_absolute_url function
  url: Handle relative urls starting with two slashes
  url: Handle relative urls being just a new query string
  url: Don't treat slashes in query parameters as directory separators

Conflicts:
	libavcodec/adxdec.c
	libavcodec/mips/Makefile
	libavcodec/pcm.c
	libavcodec/utils.c
	libavformat/Makefile
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-10 13:01:27 +02:00
Duncan Salerno 33893e6abc url: Handle relative urls starting with two slashes
This is defined by RFC 3986 section 5.4.1 to be handled this way.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-09 14:16:33 +03:00
Duncan Salerno eea003814c url: Handle relative urls being just a new query string
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-09 14:16:32 +03:00
Duncan Salerno a6363e3d89 url: Don't treat slashes in query parameters as directory separators
Strip off query parameters from the original url before
applying the new relative path.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-09 14:16:31 +03:00
Michael Niedermayer ac627b3d38 Merge commit '716d413c13981da15323c7a3821860536eefdbbb'
* commit '716d413c13981da15323c7a3821860536eefdbbb':
  Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat

Conflicts:
	doc/examples/muxing.c
	ffmpeg.h
	ffmpeg_filter.c
	ffmpeg_opt.c
	ffplay.c
	ffprobe.c
	libavcodec/8bps.c
	libavcodec/aasc.c
	libavcodec/aura.c
	libavcodec/avcodec.h
	libavcodec/avs.c
	libavcodec/bfi.c
	libavcodec/bmp.c
	libavcodec/bmpenc.c
	libavcodec/c93.c
	libavcodec/cscd.c
	libavcodec/cyuv.c
	libavcodec/dpx.c
	libavcodec/dpxenc.c
	libavcodec/eatgv.c
	libavcodec/escape124.c
	libavcodec/ffv1.c
	libavcodec/flashsv.c
	libavcodec/fraps.c
	libavcodec/h264.c
	libavcodec/huffyuv.c
	libavcodec/iff.c
	libavcodec/imgconvert.c
	libavcodec/indeo3.c
	libavcodec/kmvc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/ljpegenc.c
	libavcodec/mjpegdec.c
	libavcodec/mjpegenc.c
	libavcodec/motionpixels.c
	libavcodec/mpeg12.c
	libavcodec/mpeg12enc.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pamenc.c
	libavcodec/pcxenc.c
	libavcodec/pgssubdec.c
	libavcodec/pngdec.c
	libavcodec/pngenc.c
	libavcodec/pnm.c
	libavcodec/pnmdec.c
	libavcodec/pnmenc.c
	libavcodec/ptx.c
	libavcodec/qdrw.c
	libavcodec/qpeg.c
	libavcodec/qtrleenc.c
	libavcodec/raw.c
	libavcodec/rawdec.c
	libavcodec/rl2.c
	libavcodec/sgidec.c
	libavcodec/sgienc.c
	libavcodec/snowdec.c
	libavcodec/snowenc.c
	libavcodec/sunrast.c
	libavcodec/targa.c
	libavcodec/targaenc.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/tmv.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavcodec/vb.c
	libavcodec/vp3.c
	libavcodec/wnv1.c
	libavcodec/xl.c
	libavcodec/xwddec.c
	libavcodec/xwdenc.c
	libavcodec/yop.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/drawutils.c
	libavfilter/formats.c
	libavfilter/src_movie.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_format.c
	libavfilter/vf_hflip.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_transpose.c
	libavfilter/vf_yadif.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/movenc.c
	libavformat/mxf.h
	libavformat/utils.c
	libavformat/yuv4mpeg.c
	libavutil/imgutils.c
	libavutil/pixdesc.c
	libswscale/input.c
	libswscale/output.c
	libswscale/swscale_internal.h
	libswscale/swscale_unscaled.c
	libswscale/utils.c
	libswscale/x86/swscale_template.c
	libswscale/x86/yuv2rgb.c
	libswscale/x86/yuv2rgb_template.c
	libswscale/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-08 21:06:57 +02:00
Anton Khirnov 716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Michael Niedermayer 513042c926 Merge commit '55f9037f38bc3beacb2f5a17408c1d24c077d7fd'
* commit '55f9037f38bc3beacb2f5a17408c1d24c077d7fd':
  avformat: split muxing functions from util.c

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-02 18:20:24 +02:00
Michael Niedermayer 82db8ee321 Merge commit 'fd41cb43702498948ff14ba8c284fd5c15fc729d'
* commit 'fd41cb43702498948ff14ba8c284fd5c15fc729d':
  avconv: improve sample format negotiation for decoder request
  Opus encoder using libopus
  mpegts: Drop pointless casting of hex_dump_debug arguments
  avformat: const correctness for av_hex_dump / av_hex_dump_log
  wmadec: Adjust debug printf argument length modifier

Conflicts:
	Changelog
	ffmpeg.c
	libavcodec/libopusdec.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-02 14:58:19 +02:00
Luca Barbato 55f9037f38 avformat: split muxing functions from util.c 2012-10-01 19:57:57 +02:00
Michael Niedermayer 31ab1575e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: Convert some commented-out printf/av_log instances to av_dlog
  avcodec: Drop silly and/or broken printf debug output
  avcodec: Drop some silly commented-out av_log() invocations
  avformat: Convert some commented-out printf/av_log instances to av_dlog
  avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
  Remove some silly disabled code.
  ac3dec: ensure get_buffer() gets a buffer for the correct number of channels

Conflicts:
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h264.c
	libavcodec/h264_parser.c
	libavcodec/mjpegdec.c
	libavcodec/motion_est_template.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/put_bits.h
	libavcodec/ratecontrol.c
	libavcodec/wmaenc.c
	libavdevice/timefilter.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/flvenc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-01 16:12:38 +02:00
Diego Biurrun d3c40a7d1d avformat: const correctness for av_hex_dump / av_hex_dump_log 2012-10-01 13:18:28 +02:00
Diego Biurrun 72eaba5e4f avformat: Convert some commented-out printf/av_log instances to av_dlog 2012-10-01 10:24:28 +02:00
Michael Niedermayer 44a7a6300d lavf: free probe data in case we close before probing finished
Fixes Ticket1634

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-29 17:33:05 +02:00
Michael Niedermayer 2e4ec8947d lavf: fill in past dts based on reordered pts once the delay becomes known.
Previously we had ignored the past dts and just filled in from the
point where we have had sufficient information.

This should fix Ticket1734

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 22:58:02 +02:00
Michael Niedermayer a8e3815db5 lavf: factorize timestamp shift in update_initial_timestamps()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 22:58:02 +02:00
Michael Niedermayer 3ba0dab76a lavf: Add support offset timestamps on muxing.
This allows avoiding negative timestamps.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 15:55:16 +02:00
Michael Niedermayer 299c0b30a6 lavf: fix bug that caused has_decode_delay_been_guessed() to never return !=0
Possibly fixes Ticket1724

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 04:53:03 +02:00
Duncan Salerno 4b80a619b7 Handle the following type of relative URL correctly:
http://a/b + //c/d = http://c/d
http://a/b?c + ?d = http://a/b?d
http://a/b?c/d + /e = http://a/e

Updated with feedback from Clément Bœsch

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 03:43:06 +02:00
Michael Niedermayer 46a35959d8 Merge commit '7751e4693dd10ec98c20fbd9887233b575034272'
* commit '7751e4693dd10ec98c20fbd9887233b575034272':
  ogg: check that the expected number of headers had been parsed
  libx264: change default to closed gop to match x264cli
  Use avcodec_free_frame() to free AVFrames.
  lavf: use a malloced AVFrame in try_decode_frame().
  lavc: add avcodec_free_frame().
  lavc: ensure extended_data is set properly on decoding
  lavc: initialize AVFrame.extended_data in avcodec_get_frame_defaults()
  lavc: use av_mallocz to allocate AVFrames.
  lavc: rename the argument of avcodec_alloc_frame/get_frame_defaults

Conflicts:
	doc/APIchanges
	doc/examples/decoding_encoding.c
	libavcodec/utils.c
	libavcodec/version.h
	libavfilter/src_movie.c
	libavformat/oggdec.c
	libavformat/oggdec.h
	libavformat/oggparsetheora.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 15:15:16 +02:00
Clément Bœsch 4390f8c28d Fix two "skiping" typo. 2012-09-25 07:42:32 +02:00
Michael Niedermayer 6bcbe768bb lavf: dont add apic streams for demuxers that dont support it.
Fixes crash
Fixes ticket1730

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 02:47:09 +02:00
Stefano Sabatini bbe9fe469a lavf/utils: remove loop on AVERROR(EAGAIN) in av_read_frame()
The loop was introduced in 64d340c62a, and
was likely breaking non blocking reads as it busy loops.
2012-09-24 21:16:48 +02:00
Anton Khirnov 9eb296572e lavf: use a malloced AVFrame in try_decode_frame().
This allows using avcodec_free_frame() to free it properly.
2012-09-24 12:31:24 +02:00
Stefano Sabatini 64d340c62a lavf/utils: add error check in av_read_frame()
In particular, fix crash when the input file contains no packets (e.g. an
ffmeta input).
2012-09-24 00:41:13 +02:00
Michael Niedermayer 21c4393f1c lavf/find_stream_info: make sure we decode at least one frame for DTS
The channel layout at the demuxer layer is commonly wrong and would
otherwise be used.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-23 04:56:51 +02:00
Michael Niedermayer 61a84755a9 lavf: dont open a decoder at the top of find_stream_info before probing has finished
It could open the wrong decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-23 04:56:21 +02:00
Michael Niedermayer a380f82c53 lavf: allow using request_probe as a score threshold to accept a codec
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-23 01:22:16 +02:00
Michael Niedermayer 406cdddbdd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libx264: add forgotten ;
  matroskadec: fix a sanity check.
  matroskadec: only return corrupt packets that actually contain data
  lavf: zero data/size of the packet passed to read_packet().
  ARM: use 2-operand syntax for ADD Rd, PC in Apple PIC code
  ARM: align PIC offset pools to 4 bytes
  ARM: swap source operands in some add instructions
  configure: update tms470 detection for latest version
  lavf probe: prevent codec probe with no data at all seen
  motion_est: fix use of inline on extern functions

Conflicts:
	libavcodec/motion_est_template.c
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-21 14:44:32 +02:00
Anton Khirnov 1cc569ddda lavf: zero data/size of the packet passed to read_packet(). 2012-09-21 09:14:37 +02:00
Janne Grunau 6746cd7f61 lavf probe: prevent codec probe with no data at all seen
This occurs with fuzzed mpeg-ts files. set_codec_from_probe_data() is
called with a zeroed AVProbeData since no packet made through for
specific stream.
2012-09-20 14:50:06 +02:00
Reimar Döffinger 07d2d06395 Remove code that duplicates existing code a few lines down.
This also fixes a potential crash since s->pb can be NULL.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-09-17 21:17:43 +02:00
Michael Niedermayer f276a490f0 Merge commit '3f7fd59d151a2773f0e2e93e56b6b13ec6e5334b'
* commit '3f7fd59d151a2773f0e2e93e56b6b13ec6e5334b':
  avformat: fix typo in avformat_close_input
  mp3enc: write Xing TOC
  mp3enc: support MPEG-2 and MPEG-2.5 in Xing header.
  mp3enc: downgrade some errors in writing Xing frame to warnings
  lavf: flush the output AVIOContext in av_write_trailer().
  lavf: cosmetics, reformat av_write_trailer().
  avio: flush the internal buffer in avio_close()
  Enhance doc on asyncts audiofilter
  cmdutils: avoid setting data pointers to invalid values in alloc_buffer()
  libavcodec: remove av_destruct_packet_nofree()

Conflicts:
	libavcodec/avpacket.c
	libavformat/mp3enc.c
	libavformat/nutenc.c
	libavformat/utils.c
	libavformat/version.h
	tests/ref/lavf/voc
	tests/ref/lavf/voc_s16

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-16 14:24:11 +02:00
Luca Barbato 3f7fd59d15 avformat: fix typo in avformat_close_input
The condition should not be &&.
2012-09-15 20:23:39 +02:00
Anton Khirnov 3b4bb19e63 lavf: flush the output AVIOContext in av_write_trailer().
This is consistent with stdio and is what we want to do in all cases.

Fixes a bug in the voc muxer which didn't flush in write_trailer()
previously. This is the cause of the change in the test results.
2012-09-15 18:25:07 +02:00
Anton Khirnov 0c270239c2 lavf: cosmetics, reformat av_write_trailer(). 2012-09-15 18:24:59 +02:00
Michael Niedermayer f1ca40ee00 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  riff: Add SVQ3 fourcc
  fate: ac3: add 4.0 and downmix tests
  configure: x86: improve ebp availability check
  vorbisdec: ensure FASTDIV denominator is never 1
  avformat: refactor avformat_close_input
  avformat: simplify avformat_close_input

Conflicts:
	configure
	libavcodec/vorbisdec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 10:35:26 +02:00
Michael Niedermayer e2d643efcd lavf/compute_pkt_fields: only run pts by duration correction if reference ts is available
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-14 19:47:41 +02:00
Luca Barbato 44272c1ccc avformat: refactor avformat_close_input
Do not crash if the input format is not allocated yet.
2012-09-14 14:26:27 +02:00
Luca Barbato 4d1f443c3d avformat: simplify avformat_close_input
avio_close checks by itself for NULL condition.
2012-09-14 14:26:27 +02:00
Michael Niedermayer 062091f87f compute_pkt_fields2: dont interpret max_b_frames of <0 as there being b frames.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-14 02:30:00 +02:00
Michael Niedermayer 8470e6c96f lavf/avformat_seek_file: fix harmless integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-11 03:02:51 +02:00
Michael Niedermayer 41dba453f9 utils/update_stream_timings: fix division by zero
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-10 16:57:31 +02:00
Michael Niedermayer b422e2c58a compute_pkt_fields: fix harmless integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-10 16:15:07 +02:00
Michael Niedermayer 8a0118b4b4 ffio_read: dont spam the user at EOF with a truncation error
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-08 12:41:57 +02:00
Stefano Sabatini 25f139e72f lavf/utils: fix typo in has_codec_parameters
Replace "unspecified sample size" with "unspecified frame size". +10l.
2012-09-07 14:31:37 +02:00
Michael Niedermayer a7fbc7d7b7 lavf: factor codec id forcing out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-07 13:16:04 +02:00
Stefano Sabatini 29e972f67c lavu/parseutils: add av_small_strptime()
Make internal small_strptime() function public, and use it in place of
strptime().
This allows to avoid a dependency on strptime() on systems which do not
support it.

In particular, fix trac ticket #992.
2012-09-06 00:40:01 +02:00
Clément Bœsch 5620088494 lavf: fix a few typo in some comments. 2012-09-05 23:22:35 +02:00
Clément Bœsch 9d9f34a3c1 lavf: remove a few useless AV_NOWARN_DEPRECATED().
read_seek was undeprecated in e5c708151.
2012-09-05 23:18:07 +02:00
Michael Niedermayer 19d8954966 find_stream_info: update last_dts more often
This improves dts validity checks and consequently fps detection of files with invalid dts
Fixes Ticket1681

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-30 23:48:54 +02:00
Michael Niedermayer 12b1512e85 lavf/utils: Try to unwrap pts/dts so as to minimize wraps
Based on code by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-24 03:08:51 +02:00
Michael Niedermayer 254917f078 lavf/utils: run update_initial_timestamps() outside some if()
This way it gets executed earlier and updated timestamps become available earlier.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-24 03:07:03 +02:00
Clément Bœsch 26ec392a0e lavf: remove unused AVStream pointer. 2012-08-21 13:48:08 +02:00
Clément Bœsch 3dba9e19c8 lavf: add const qualifier to AVCodecDescriptor pointer in is_intra_only().
Fix "assignment discards ‘const’ qualifier from pointer target type" warnings.
2012-08-21 13:47:43 +02:00
Michael Niedermayer 85a576775e lavf: factor ff_free_stream() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-21 06:13:54 +02:00
Michael Niedermayer c9fe864472 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vorbisdec: remove some pointless comments
  avprobe: add const to AVCodec pointer
  libavformat: add const to AVCodec pointers
  pthread: add const to AVCodec pointers

Conflicts:
	ffprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-19 14:55:58 +02:00
Michael Niedermayer 28ff17fa97 lavf: add use_wallclock_as_timestamps
This may fix Ticket730

Reviewed-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-18 19:19:47 +02:00
Mans Rullgard edb5238ccb libavformat: add const to AVCodec pointers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-18 14:20:57 +01:00
Michael Niedermayer 11f8f2c0f3 avformat: export queue_attached_pictures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-16 04:37:55 +02:00
Andrey Utkin aec9390a9d Check for avio fail in avformat_write_header, av_write_frame
With minor changes by michael
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-14 16:25:53 +02:00
Nicolas George b1511e00f6 lavf: probe PGS subtitles definition.
The resolution is in the packets, so decoding must happen.
Since most other formats do not set the dimension, make it
a special case for PGS. If other codecs were to have the
same requirement, using a CODEC_CAP would be preferred.
2012-08-14 11:17:45 +02:00
Michael Niedermayer d5c90ff23b lavf: reimplement is_intra_only() by using the AVCodecContext codec descriptor
This also changes behavior as the descriptor table is more complete than
the switch/case it replaces. As well as considering all non video as
intra only

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-12 14:51:22 +02:00
Michael Niedermayer d0bf3bf1ff Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavf: Detect discontinuities in timestamps for framerate/analyzeduration calculation
  lavf: Initialize the stream info timestamps in avformat_new_stream
  id3v2: Match PIC mimetype/format case-insensitively
  configure: Rename check_asm() to more fitting check_inline_asm()
  fate: Only test enabled filters
  avresample: De-doxygenize some comments where Doxygen is not appropriate
  rtmp: split chunk_size var into in_chunk_size and out_chunk_size
  rtmp: Factorize the code by adding find_tracked_method

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-12 13:43:03 +02:00
Martin Storsjö bdefe22b8e lavf: Detect discontinuities in timestamps for framerate/analyzeduration calculation
If the dts difference is more than 1000 times the average dts
difference, restart the analysis.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-12 12:39:49 +03:00
Martin Storsjö 30c26c2442 lavf: Initialize the stream info timestamps in avformat_new_stream
These are normally initialized to AV_NOPTS_VALUE at the start
of avformat_find_stream_info, but if a new stream is found while
this function is running (e.g. like in mpegts), the newly added
AVStreams didn't have these values properly initalized, leading
to avformat_find_stream_info terminating too soon (when the
first timestamps are far from 0).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-12 12:39:47 +03:00
Michael Niedermayer a036ac5782 lavf: do not discard correct dts in favor of wrong pts for vc1-wmapro.ism
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-12 00:52:20 +02:00
Michael Niedermayer f5f3684fb8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavf: simplify is_intra_only() by using codec descriptors.
  lavc: add an intra-only codec property.
  lavc: add codec descriptors.
  lavc: fix mixing CODEC_ID/AV_CODEC_ID in C++ code.
  dict: move struct AVDictionary definition to dict.c
  dict: add av_dict_count()

Conflicts:
	doc/APIchanges
	libavcodec/old_codec_ids.h
	libavformat/utils.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-11 15:01:45 +02:00
Anton Khirnov 885da7b082 lavf: simplify is_intra_only() by using codec descriptors. 2012-08-11 11:34:24 +02:00
Mans Rullgard 987170cb9d dict: add av_dict_count()
This adds a function to retrieve the number of entries in a
dictionary and updates the places directly accessing what should
be an opaque struct to use this new function instead.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-10 15:15:00 +01:00
Michael Niedermayer b615dbb319 lavf: block special characters in dump metadata
This is limited to the chars that arent filtered by av_log() already
we might filter more aggressively if theres some case where this becomes
needed.

Fixes Ticket1181

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-08 21:13:15 +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 7ae473e8a0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  nuv: K&R formatting cosmetics
  build: generalise rules and variable settings for av* programs
  nuv: check RTjpeg header for validity
  Revert "nuv: check per-frame header for validity."
  imc: remove unused field IMCContext.one_div_log2
  imc: fix size of a memset()
  imc: remove empty if() block
  fate: simplify variable setting filter.mak
  lavf: Declare an AVRational struct without a struct literal

Conflicts:
	Makefile
	configure
	libavcodec/nuv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-06 22:22:37 +02:00
Clément Bœsch 16dc5f2050 Replace various inlined inverse AVRational with av_inv_q(). 2012-08-06 00:04:36 +02:00
Martin Storsjö 6c071a2b38 lavf: Declare an AVRational struct without a struct literal
At this place, the normal way of initializing a struct works
fine, there's no need for a struct literal.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-06 00:48:58 +03:00
Michael Niedermayer 3e1cf49676 compute_pkt_fields: do not attempt to calculate dts when the delay hasnt been estimated.
Fixes ticket1242

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-04 15:42:44 +02:00
Michael Niedermayer 2107009e7d lavf: move nb_decoded_frames out of info.
This way the variable is available outside find_stream_info

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-04 15:42:44 +02:00
Michael Niedermayer b288b4c63f has_decode_delay_been_guessed: adjust value for has_b_frames=0
needed for a mkv file

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-04 15:42:44 +02:00
Michael Niedermayer c91ca5b95d lavf: move has_decode_delay_been_guessed() up to make it accessible to earlier functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-04 15:42:44 +02:00
Michael Niedermayer 7d1918affe Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flvdec: remove spurious use of stream id
  lavf: deprecate r_frame_rate.
  lavf: round estimated average fps to a "standard" fps.

Conflicts:
	ffmpeg.c
	ffprobe.c
	libavformat/avformat.h
	libavformat/electronicarts.c
	libavformat/flvdec.c
	libavformat/rawdec.c
	libavformat/utils.c
	tests/ref/fate/iv8-demux

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-30 00:56:33 +02:00
Michael Niedermayer 7c26761b81 Merge commit 'fe1c1198e670242f3cf9e3e1eef27cff77f3ee23'
* commit 'fe1c1198e670242f3cf9e3e1eef27cff77f3ee23':
  lavf: use dts difference instead of AVPacket.duration in find_stream_info()
  avf: introduce nobuffer option
  fate: make yadif tests consistent across systems
  vf_hqdn3d: support 9 and 10bit colordepth
  vf_hqdn3d: reduce intermediate precision
  vf_hqdn3d: simplify and optimize
  factor identical ff_inplace_start_frame out of two filters
  vf_hqdn3d: cosmetics
  avprobe/avconv: fix tentative declaration compile errors on MSVS.

Conflicts:
	doc/APIchanges
	ffmpeg.c
	ffprobe.c
	libavformat/avformat.h
	libavformat/options_table.h
	libavformat/utils.c
	libavformat/version.h
	tests/fate/filter.mak
	tests/ref/fate/filter-yadif-mode0
	tests/ref/fate/filter-yadif-mode1

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-29 23:04:49 +02:00
Anton Khirnov aba232cfa9 lavf: deprecate r_frame_rate.
According to its description, it is supposed to be the LCM of all the
frame durations. The usability of such a thing is vanishingly small,
especially since we cannot determine it with any amount of reliability.
Therefore get rid of it after the next bump.

Replace it with the average framerate where it makes sense.

FATE results for the wtv and xmv demux tests change. In the wtv case
this is caused by the file being corrupted (or possibly badly cut) and
containing invalid timestamps. This results in lavf estimating the
framerate wrong and making up wrong frame durations.
In the xmv case the file contains pts jumps, so again the estimated
framerate is far from anything sane and lavf again makes up different
frame durations.

In some other tests lavf starts making up frame durations from different
frame.
2012-07-29 08:06:30 +02:00
Anton Khirnov f66eeff1c8 lavf: round estimated average fps to a "standard" fps. 2012-07-29 08:05:46 +02:00
Anton Khirnov fe1c1198e6 lavf: use dts difference instead of AVPacket.duration in find_stream_info()
AVPacket.duration is mostly made up and thus completely useless, this is
especially true for video streams.
Therefore use dts difference for framerate estimation and
the max_analyze_duration check.

The asyncts test now needs -analyzeduration, because the default is 5
seconds and the audio stream in the sample appears at ~10 seconds.
2012-07-29 08:04:42 +02:00
Luca Barbato 681ed00099 avf: introduce nobuffer option
Useful in cases where a significant analyzeduration is
still needed, while minimizing buffering before output.

An example is processing low-latency streams where all
media types won't necessarily come in if the
analyzeduration is small.

Additional changes by Josh Allmann <joshua.allmann@gmail.com>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-07-29 07:58:00 +02:00
Michael Niedermayer 706bd8ea19 Merge remote-tracking branch 'qatar/master'
* qatar/master: (35 commits)
  h264_idct_10bit: port x86 assembly to cpuflags.
  x86inc: clip num_args to 7 on x86-32.
  x86inc: sync to latest version from x264.
  fft: rename "z" to "zc" to prevent name collision.
  wv: return meaningful error codes.
  wv: return AVERROR_EOF on EOF, not EIO.
  mp3dec: forward errors for av_get_packet().
  mp3dec: remove a pointless local variable.
  mp3dec: remove commented out cruft.
  lavfi: bump minor to mark stabilizing the ABI.
  FATE: add tests for yadif.
  FATE: add a test for delogo video filter.
  FATE: add a test for amix audio filter.
  audiogen: allow specifying random seed as a commandline parameter.
  vc1dec: Override invalid macroblock quantizer
  vc1: avoid reading beyond the last line in vc1_draw_sprites()
  vc1dec: check that coded slice positions and interlacing match.
  vc1dec: Do not ignore ff_vc1_parse_frame_header_adv return value
  configure: Move parts that should not be user-selectable to CONFIG_EXTRA
  lavf: remove commented out cruft in avformat_find_stream_info()
  ...

Conflicts:
	Makefile
	configure
	libavcodec/vc1dec.c
	libavcodec/x86/h264_deblock.asm
	libavcodec/x86/h264_deblock_10bit.asm
	libavcodec/x86/h264dsp_mmx.c
	libavfilter/version.h
	libavformat/mp3dec.c
	libavformat/utils.c
	libavformat/wv.c
	libavutil/x86/x86inc.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-29 02:16:26 +02:00
Anton Khirnov efd34918ba lavf: remove commented out cruft in avformat_find_stream_info() 2012-07-28 10:00:38 +02:00
Anton Khirnov c4ef6a3e4b Add missing libavutil/time.h includes. 2012-07-28 09:02:07 +02:00
Michael Niedermayer 12d1ee6a5e ff_add_index_entry: reject AV_NOPTS_VALUE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-26 03:05:31 +02:00
Michael Niedermayer 2cd491a47c lavf: move generic index generation code to a later point
By moving it to a later point relative and unknown timestamps
are more likely to have been corrected

similar patch reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Conflicts:

	libavformat/utils.c
2012-07-26 03:04:49 +02:00
Michael Niedermayer 2880c31660 parse_packet: use pkt.pos always instead of the avparser offset.
This is more correct and will be needed when the code is moved to
a later point.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-26 02:20:59 +02:00
Michael Niedermayer 9054f6b66b probe_codec: fix memory corruption
Found-by: Tanami Ohad
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-26 01:10:55 +02:00
Michael Niedermayer da62b4326b av_find_stream_info: skip flushing codecs and estimating timings if probe_size==0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-25 17:39:25 +02:00
Michael Niedermayer 1c2beff04a lavf: Set pos for all packets of AVSTREAM_PARSE_FULL_RAW files.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-25 01:57:25 +02:00
Michael Niedermayer e2fd18d40d lavf: factor AVStream st out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-25 00:45:17 +02:00
Michael Niedermayer 6b38101df5 parse_packet: reset pkt->pos after it has been used
This should have no effect as it was not used in this case

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-25 00:42:50 +02:00
Michael Niedermayer 01272e7662 Revert "lavf: count skipped samples for initial timestamps."
This reverts commit 885fc05865.
This commit caused timestamps in case of generic seeking to become
inconsistent.
2012-07-24 17:10:38 +02:00
Peter Ross 1be55c82a5 av_url_split: dont let '/' char whallop '?' char
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-22 16:26:43 +02:00
Nicolas George b0629366a2 lavf: make cmdutils's check_stream_specifier public.
The new function is called avformat_match_stream_specifier()
and does not include logging the error message.
2012-07-20 13:16:23 +02:00
Nicolas George 885fc05865 lavf: count skipped samples for initial timestamps.
If skip_samples is set and timestamps are synthesized using durations,
make them start at -skip_samples (rescaled) instead of 0,
so that the timestamp of the first undiscarded sample is 0.
2012-07-19 23:41:03 +02:00
Nicolas George 0e57d79b0c lavf: set pkt_timebase at the same time as stream->time_base. 2012-07-19 23:41:03 +02:00
Stefano Sabatini 5784a46986 lavf/utils: show the number of stream in case of missing parameter
Increase feedback provided in avformat_find_stream_info().
2012-07-18 18:08:57 +02:00
Stefano Sabatini 739ec710c4 lavf/utils: suggest what to do in case of missing codec information
In particular, fix trac issue #218.
2012-07-18 18:08:57 +02:00
Stefano Sabatini a293549b32 lavf/utils: extend has_codec_parameters() to make it show what info is missing
Improve feedback.
2012-07-18 18:08:56 +02:00
Michael Niedermayer 018601dbf9 lavf: inject sample skip side data when requested by the demuxer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-12 20:32:03 +02:00
Michael Niedermayer d8ce478c43 lavf: limit "Adjusting PTS forward" code to video streams
It can end up slightly messing up a series of valid timestamps
after a invalid one.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-08 22:29:34 +02:00
Michael Niedermayer a08efa2e36 has_decode_delay_been_guessed: tighten up the heuristic.
This adds the minimum delay needed with the current decoder to
recognize the reorder buffer size for the reference bitstreams.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-02 23:23:33 +02:00
Michael Niedermayer 4e9e0700fb has_decode_delay_been_guessed: skip guessing when sps.num_reorder_frames is available
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-02 23:18:32 +02:00
Michael Niedermayer 2c883c6acf has_decode_delay_been_guessed: improve heuristic
This allows MR4_TANDBERG_C.264 and MR5_TANDBERG_C.264 to be decoded without -strict 1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-02 22:59:42 +02:00
Stefano Sabatini 3cd4f9fd76 lavf: allow multiple names in output devices selected by av_guess_format()
Consistent with av_find_input_format().
2012-06-29 16:54:18 +02:00
Hendrik Leppkes 5916313967 avformat: offset fps calculation by one to include 60.00 fps
To ensure the full range of values is still used, also adjust all uses of this function to loop from 0
instead of 1. This way only 60.00 is added and nothing lost.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-22 01:58:57 +02:00
Hendrik Leppkes 6d887ecac2 avformat: add 48 fps to the NTSC framerates
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-21 12:04:47 +02:00
Michael Niedermayer 4da42ebe44 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  MS Screen 1 decoder
  aacdec: Fix popping channel layouts.
  av_gettime: support Win32 without gettimeofday()
  Use av_gettime() in various places
  Move av_gettime() to libavutil
  dct-test: use emms_c() from libavutil instead of duplicating it
  mov: fix operator precedence bug
  mathematics.h: remove a couple of math defines
  Remove unnecessary inclusions of [sys/]time.h
  lavf: remove unnecessary inclusions of unistd.h
  bfin: libswscale: add const where appropriate to fix warnings
  bfin: libswscale: remove unnecessary #includes
  udp: Properly check for invalid sockets
  tcp: Check the return value from getsockopt
  network: Use av_strerror for getting error messages
  udp: Properly print error from getnameinfo
  mmst: Use AVUNERROR() to convert error codes to the right range for strerror
  network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows
  rtmp: Reduce the number of idle posts sent by sleeping 50ms

Conflicts:
	Changelog
	configure
	libavcodec/aacdec.c
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/dct-test.c
	libavcodec/version.h
	libavformat/riff.c
	libavformat/udp.c
	libavutil/Makefile
	libswscale/bfin/yuv2rgb_bfin.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-20 20:47:46 +02:00
Mans Rullgard ae0a301668 Move av_gettime() to libavutil
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 17:09:03 +01:00
Michael Bradshaw 2243f0d078 lavf: add field for how duration is estimated
Signed-off-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
2012-06-18 09:36:34 +02:00
Michael Niedermayer 5c14b282d1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flacdec: read attached pictures.
  lavf: don't segfault when a NULL filename is passed to avformat_open_input()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-16 23:22:42 +02:00
Anton Khirnov a5db8e4a1a lavf: don't segfault when a NULL filename is passed to avformat_open_input()
This can easily happen when the caller is using a custom AVIOContext.

Behave as if the filename was an empty string in this case.

CC: libav-stable@libav.org
2012-06-16 17:09:33 +02:00
Michael Bradshaw 67703d64d7 lavf: cosmetic: format else with indentation
Signed-off-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-15 19:44:42 +02:00
Michael Niedermayer 2a622c2369 lavf: add a "warning" when discarding a oddly backward subtitle or data starttime
Idea-by: ohsix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-12 19:28:08 +02:00
Michael Niedermayer 47695b1d65 lavf: handle data like subtitles in start time calculation.
This fixes an issue with a crazy data track starting with a large
negative timestamp.

It could as well be solved in all user apps, but this is looking
attractively simpler ...

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-12 19:19:00 +02:00
Michael Niedermayer 107b42388c lavf: fix missing "parser not found" message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-07 19:02:32 +02:00
Michael Niedermayer ad60b3b181 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vorbis: Validate that the floor 1 X values contain no duplicates.
  avprobe: Identify codec probe failures rather than calling them unsupported codecs.
  avformat: Probe codecs at score 0 on buffer exhaustion conditions.
  avformat: Factorize codec probing.
  Indeo Audio decoder
  imc: make IMDCT support stereo output
  imc: move channel-specific data into separate context
  lavfi: remove request/poll and drawing functions from public API on next bump
  lavfi: make avfilter_insert_pad and pals private on next bump.
  lavfi: make formats API private on next bump.
  avplay: use buffersrc instead of custom input filter.
  avtools: move buffer management code from avconv to cmdutils.
  avconv: don't use InputStream in the buffer management code.
  avconv: fix exiting when max frames is reached.
  mpc8: fix maximum bands handling
  aacdec: Turn PS off when switching to stereo and turn it to implicit when switching to mono.

Conflicts:
	Changelog
	cmdutils.h
	ffmpeg.c
	ffplay.c
	ffprobe.c
	libavcodec/avcodec.h
	libavcodec/mpc8.c
	libavcodec/v210dec.h
	libavcodec/version.h
	libavcodec/vorbisdec.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/formats.c
	libavfilter/src_movie.c
	libavfilter/vf_aspect.c
	libavfilter/vf_blackframe.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_crop.c
	libavfilter/vf_cropdetect.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawbox.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_fifo.c
	libavfilter/vf_format.c
	libavfilter/vf_frei0r.c
	libavfilter/vf_gradfun.c
	libavfilter/vf_hflip.c
	libavfilter/vf_hqdn3d.c
	libavfilter/vf_libopencv.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_select.c
	libavfilter/vf_showinfo.c
	libavfilter/vf_transpose.c
	libavfilter/vf_unsharp.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_color.c
	libavfilter/vsrc_testsrc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-06 01:08:33 +02:00
Alex Converse f0ff9eb493 avformat: Probe codecs at score 0 on buffer exhaustion conditions. 2012-06-05 09:51:51 -07:00
Alex Converse 62bebf6edb avformat: Factorize codec probing. 2012-06-05 09:51:51 -07:00
Michael Niedermayer 5665674b55 lavf: use input keyframe flag when muxer does not provide keyframe flags.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-02 21:11:43 +02:00
Michael Niedermayer 121d3875b6 lavf: print the invalid tb in avpriv_set_pts_info()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-23 19:04:23 +02:00
Michael Niedermayer a6b3471c44 avformat: add needs_parsing type to enable codec TS use.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-22 14:59:02 +02:00
Michael Niedermayer 938adb7abc Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dwt: K&R prettyprinting cosmetics
  Remove libnut wrapper
  fate: change name of FATE samples location environment variable
  avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.
  http: Factorize the code by adding http_read_header()

Conflicts:
	configure
	doc/APIchanges
	doc/fate.texi
	libavcodec/dwt.c
	libavcodec/dwt.h
	libavformat/Makefile
	libavformat/avformat.h
	libavformat/libnut.c
	libavformat/matroskaenc.c
	libavformat/utils.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-21 23:53:39 +02:00
James Zern e9cef89702 avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-05-20 19:50:32 -04:00
Michael Niedermayer 349c62410b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  indeo: Make ivi_calc_band_checksum() static, it is only used in one file.
  indeo: Drop unused debug function ivi_check_band().
  avcodec/utils: cast a function argument to shut up a compiler warning
  truemotion1: remove disabled code
  fix typo in comment
  fate: fix dependencies for non-SAMPLES avconv tests
  indeo: check for invalid motion vectors
  indeo: check that band output buffer exists
  indeo: clear allocated band buffers
  indeo: track tile macroblock size
  indeo: check custom Huffman tables for errors
  factor out common decoding code for Indeo 4 and Indeo 5
  mp3: fix start band index for block type 2 in 8kHz audio
  lavf: change some (de)muxer names to lowercase
  lavf: make output format matching case insensitive

Conflicts:
	libavcodec/indeo4.c
	libavcodec/indeo5.c
	libavcodec/ivi_common.c
	libavcodec/utils.c
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-20 22:58:04 +02:00
Marton Balint b36a0a80fc lavf: also use codec aspect ratio in av_guess_sample_aspect_ratio
Use codec aspect ratio for frame aspect ratio if AVFrame is NULL.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-20 19:36:00 +02:00
Mans Rullgard 81ad97eeda lavf: make output format matching case insensitive
This is consistent with how input formats are matched.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-19 19:44:15 +01:00
Michael Niedermayer 703e920bb7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: Work around non-standard wc implementations at more places
  fate: work around non-standard wc implementations
  x86: rv40: Mark rv40_weight functions as MMX2; they use MMX2 instructions.
  ac3dsp: simplify x86 versions of ac3_max_msb_abs_int16
  fate: use standard diff options
  tta: Fix comment about channel number; TTA supports >2 channels.
  avfilter: Move ff_get_ref_perms_string() to where it is used.
  build: Add 'check' target to run all compile and test targets.
  indeo3: validate new frame size before resetting decoder
  indeo3: when freeing buffers, set pointers referencing them to NULL as well
  indeo3: initialise pixel planes on allocation
  indeo3: ensure that decoded cell data is in 7-bit range as presumed by decoder
  fate: rename psx-str-v3-mdec to mdec-v3
  fate: convert psx-str to a demuxer test
  lavf: add mdec to is_intra_only() list

Conflicts:
	doc/developer.texi
	libavcodec/indeo3.c
	libavfilter/video.c
	libavformat/utils.c
	tests/fate/demux.mak
	tests/fate/video.mak
	tests/lavf-regression.sh
	tests/ref/vsynth1/cljr
	tests/ref/vsynth1/ffvhuff
	tests/ref/vsynth2/cljr
	tests/ref/vsynth2/ffvhuff

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-16 22:32:05 +02:00
Mans Rullgard db465be45d lavf: add mdec to is_intra_only() list
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-15 15:49:56 +01:00
Marton Balint 94a9ac1277 lavf: add av_guess_frame_sample_aspect_ratio function
Guesses the sample aspect ratio of a frame, based on both the stream and the
frame aspect ratio.

Since the frame aspect ratio is set by the codec but the stream aspect ratio
is set by the demuxer, these two may not be equal. This function tries to
return the value that you should use if you would like to display the frame.

Basic logic is to use the stream aspect ratio if it is set to something sane
otherwise use the frame aspect ratio. This way a container setting, which is
usually easy to modify can override the coded value in the frames.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-14 23:40:46 +02:00
Michael Niedermayer 381cc4b1e6 update_initial_durations: use av_ts2str()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-14 17:51:05 +02:00
Michael Niedermayer c69b6649cf update_initial_durations: add some checks to ensure things match up.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-14 17:14:44 +02:00
Clément Bœsch 5edd4fce40 lavf/utils: make use of av_ts2str() to print timestamps. 2012-05-13 22:38:31 +02:00
Michael Niedermayer 75a9479b39 lavf: extend the avi raw hack to mov
Fixes ticket1194

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-11 16:53:22 +02:00
Michael Niedermayer 30fc710556 lavf: print a matching tag in case of code tag validation failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-11 16:52:47 +02:00
Michael Niedermayer bce42e95d1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: add POWER[5-7] support
  arm: intreadwrite: revert 16-bit load asm to old version for gcc < 4.6
  vqavideo: return error if image size is not a multiple of block size
  cosmetics: indentation
  avformat: only fill-in interpolated timestamps if duration is non-zero
  avformat: remove a workaround for broken timestamps

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-05 00:54:28 +02:00
Justin Ruggles e5356ebf22 cosmetics: indentation 2012-05-03 16:28:08 -04:00
Justin Ruggles 8916f1fbcb avformat: only fill-in interpolated timestamps if duration is non-zero
This avoids returning duplicate timestamps for multiple packets when the
demuxer does not provide all timestamps and packet duration is not known.
2012-05-03 16:28:08 -04:00
Justin Ruggles ff499157a1 avformat: remove a workaround for broken timestamps
This modifies pts in situations other than what was intended, leading to
invalid timestamps.

Reverts commit 90bb394dcc
2012-05-03 16:28:08 -04:00
Reimar Döffinger 7effbee66c Mark truncated packets as corrupt in av_get_packet.
Manually remove that flag again for formats that read an arbitrary
amount of data and thus truncation is not an error.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-05-01 23:20:52 +02:00
Jean First 64943b47e7 lavf remove duplicated check in has_duration
this hunk was merged in 8b97ae64 and cbf767a8 although the check was there a
few lines above since cdced09e. I removed the first check to reduce the differences
to libav.

Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-28 19:07:30 +02:00
Michael Niedermayer e890b68962 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dsputil: fix invalid array indexing
  configure: add libavresample to rpath
  build: icc: silence some warnings
  fft-test: add option to set cpuflag mask
  cpu: recognise only cpu flag names pertinent to the architecture
  avutil: add av_parse_cpu_flags() function
  vp8: armv6: fix non-armv6t2 build
  vp8: armv6 optimisations
  vp8: arm: separate ARMv6 functions from NEON
  ARM: add some compatibility macros
  mov: support eac3 audio
  avf: fix faulty check in has_duration

Conflicts:
	configure
	doc/APIchanges
	ffmpeg.c
	libavcodec/arm/Makefile
	libavcodec/arm/asm.S
	libavcodec/arm/vp8dsp_armv6.S
	libavcodec/arm/vp8dsp_init_arm.c
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-26 22:24:58 +02:00
Luca Barbato 8b97ae6484 avf: fix faulty check in has_duration
An invalid duration is AV_NOPTS_VALUE not 0.
2012-04-25 11:40:22 -07:00
Nicolas George 73bc019baf lavf: print a warning if probesize seems not enough. 2012-04-23 12:26:19 +02:00
Michael Niedermayer 9f39d3d190 lavf: check that the context to avformat_open_input() is valid.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 15:30:34 +02:00
Reimar Döffinger 4a95876f4d Add skip_to_keyframe stream variable.
This replaces the matroskadec one with the same name.
The advantage is not only easier reuse in other demuxers
but also that we can make the decisions after the parser.
This fixes seeking in files that mark the keyframes incorrectly,
for example the file in track ticket #1003.
The matroska variable is still kept to be able to complain
about such broken files.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-16 22:13:11 +02:00
Michael Niedermayer 7432bcfe5a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vsrc_buffer: fix check from 7ae7c41.
  libxvid: Reorder functions to avoid forward declarations; make functions static.
  libxvid: drop some pointless dead code
  wmal: vertical alignment cosmetics
  wmal: Warn about missing bitstream splicing feature and ask for sample.
  wmal: Skip seekable_frame_in_packet.
  wmal: Drop unused variable num_possible_block_size.
  avfiltergraph: make the AVFilterInOut alloc/free API public
  graphparser: allow specifying sws flags in the graph description.
  graphparser: fix the order of connecting unlabeled links.
  graphparser: add avfilter_graph_parse2().
  vsrc_buffer: allow using a NULL buffer to signal EOF.
  swscale: handle last pixel if lines have an odd width.
  qdm2: fix a dubious pointer cast
  WMAL: Do not try to read rawpcm coefficients if bits is invalid
  mov: Fix detecting there is no sync sample.
  tiffdec: K&R cosmetics
  avf: has_duration does not check the global one
  dsputil: fix optimized emu_edge function on Win64.

Conflicts:
	doc/APIchanges
	libavcodec/libxvid_rc.c
	libavcodec/libxvidff.c
	libavcodec/tiff.c
	libavcodec/wmalosslessdec.c
	libavfilter/avfiltergraph.h
	libavfilter/graphparser.c
	libavfilter/version.h
	libavfilter/vsrc_buffer.c
	libswscale/output.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 22:37:43 +02:00
Michael Niedermayer 52ec269573 lavf: print with debug level the byte positions before and after find_stream_info
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 11:46:23 +02:00
Luca Barbato cbf767a87c avf: has_duration does not check the global one
Some container formats report a global duration, but not a per stream
one.
2012-04-13 12:03:16 -07:00
Michael Niedermayer 75b38674b6 lavf: compute_pkt_fields, limit the pts upcorrection to mpeg
The pts correction conflicts with the ogg vorbis demuxer.

Thanks-to: Justin Ruggles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-12 11:35:38 +02:00
Reimar Döffinger 277f20c3c8 lavf: always call avio_flush in av_write_trailer.
Otherwise for muxers like e.g. latmenc that never call
avio_flush (and do not have a write_trailer function)
a part of the data will always be missing.
Also update references for the voc muxer, which was also
buggy before and did not write out all data.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-12 00:13:53 +02:00
Michael Niedermayer 6101e5322f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec_asf: Set the no_resync_search option for the chained asf demuxer
  asfdec: Add an option for not searching for the packet markers
  cosmetics: Clean up the tiffenc pix_fmts declaration to match the style of others
  cosmetics: Align codec declarations
  cosmetics: Convert mimic.c to utf-8
  avconv: remove an unused function parameter.
  avconv: remove now pointless variables.
  avconv: drop support for building without libavfilter.
  nellymoserenc: fix crash due to memsetting the wrong area.
  libavformat: Only require first packet to be known for audio/video streams
  avplay: Don't try to scale timestamps if the tb isn't set

Conflicts:
	Changelog
	configure
	ffmpeg.c
	libavcodec/aacenc.c
	libavcodec/bmpenc.c
	libavcodec/dnxhddec.c
	libavcodec/dnxhdenc.c
	libavcodec/ffv1.c
	libavcodec/flacenc.c
	libavcodec/fraps.c
	libavcodec/huffyuv.c
	libavcodec/libopenjpegdec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpeg4videodec.c
	libavcodec/pamenc.c
	libavcodec/pgssubdec.c
	libavcodec/pngenc.c
	libavcodec/qtrleenc.c
	libavcodec/rawdec.c
	libavcodec/sgienc.c
	libavcodec/tiffenc.c
	libavcodec/v210dec.c
	libavcodec/wmv2dec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 22:41:37 +02:00
Joakim Plate ba24f12982 libavformat: Only require first packet to be known for audio/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: Martin Storsjö <martin@martin.st>
2012-04-06 20:51:18 +03:00
Thierry Foucu c99bdd51b2 lavf: Fix the last PTS to be generated using -fflags +genpts
To reproduce the problem, using ffprobe:

./ffprobe -show_packets -print_format compact -fflags +genpts -i
fate_samples/mxf/C0023S01.mxf

You will notice that the last video frame does not have it's PTS being
set, even with using genpts.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-05 12:33:33 +02:00
Reimar Döffinger a45605a1ba Add AVIO_FLAG_DIRECT.
Allows avoiding the buffer when using avio read, write and seek functions.
When using the ffmpeg executable -avioflags direct can be used to enable
this mode for input files, but has no effect on output files.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-04 20:39:33 +02:00
Michael Niedermayer ca26c2c30f lavf: add mp1/2 to determinable_frame_size()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-04 18:21:37 +02:00
Michael Niedermayer ae3ee72e02 lavf: print some more things in TS debug statements
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-03 23:46:23 +02:00
Michael Niedermayer b5d433d306 lavf: increase RELATIVE_TS_BASE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-03 23:46:23 +02:00
Michael Niedermayer 30ced7e69f lavf: print ts values in pts < dts error message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-29 20:31:14 +02:00
Michael Niedermayer d40ff29cac Merge remote-tracking branch 'qatar/master'
* qatar/master:
  asf: only set index_read if the index contained entries.
  cabac: add overread protection to BRANCHLESS_GET_CABAC().
  cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC().
  cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE().
  cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC().
  h264: add overread protection to get_cabac_bypass_sign_x86().
  h264: reindent get_cabac_bypass_sign_x86().
  h264: use struct offsets in get_cabac_bypass_sign_x86().
  h264: fix overreads in cabac reader.
  wmall: fix seeking.
  lagarith: fix buffer overreads.
  dvdec: drop unnecessary dv_tablegen.h #include
  build: fix doc generation errors in parallel builds
  Replace memset(0) by zero initializations.
  faandct: Remove FAAN_POSTSCALE define and related code.
  dvenc: print allowed profiles if the video doesn't conform to any of them.
  avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size.
  FATE: add a test for vp8 with changing frame size.
  fate: add kgv1 fate test.
  oggdec: calculate correct timestamps in Ogg/FLAC

Conflicts:
	libavcodec/4xm.c
	libavcodec/cook.c
	libavcodec/dvdata.c
	libavcodec/dvdsubdec.c
	libavcodec/lagarith.c
	libavcodec/lagarithrac.c
	libavcodec/utils.c
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-29 04:11:10 +02:00
Diego Biurrun a92be9b856 Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
2012-03-28 09:38:33 +02:00
Michael Niedermayer 6999f8bcf5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  make av_interleaved_write_frame() flush packets when pkt is NULL
  mpegts: Fix dead error checks
  vc1: Do not read from array if index is invalid.
  targa: convert to bytestream2.
  rv34: set mb_num_left to 0 after finishing a frame

Conflicts:
	libavcodec/targa.c
	libavcodec/vc1data.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-27 11:59:39 +02:00
Jindrich Makovicka 904100e5fc make av_interleaved_write_frame() flush packets when pkt is NULL
This patch allows the user to force flushing of all queued packets
by calling av_interleaved_write_frame() with pkt set to NULL.

Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-27 11:12:55 +03:00
Reimar Döffinger 699c61d2f0 Handle 0-size sync packets when only parsing headers.
Currently, the duration of those packets is just discarded
when enabling parsing, thus the output of the Metal Gear Solid
demuxer breaks completely when just setting AVSTREAM_PARSE_HEADERS.
The result will not be correct if a parser creates a delay even
with PARSER_FLAG_COMPLETE_FRAMES and there might be other cases
where it does not work correct, but just discarding them as it
is done currently seems worse.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-26 20:03:56 +02:00
Reimar Döffinger 2a4f1d38d9 Print a warning when using wild guesses as time stamps.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-21 20:15:31 +01:00
Michael Niedermayer 0ebd83617f Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  avconv: free packet in write_frame() when discarding due to frame number limit
  FATE: use +/- flag option syntax for vp8 emu-edge tests
  lavf: make av_interleave_packet_per_dts() private.
  lavf: deprecate av_read_packet().
  oggdec: output correct timestamps for Vorbis
  avconv: pass input stream timestamps to audio encoders
  lavc: shrink encoded audio packet size after encoding.
  xa: set correct bit rate
  xa: do not set bit_rate, block_align, or bits_per_coded_sample
  xa: fix end-of-file handling
  xa: fix timestamp calculation
  bink: fix typo in FFALIGN() argument
  bink: align plane width to 8 when calculating bundle sizes
  doc: pass -Idoc texi2html and texi2pod
  doc: texi2pod: add -I flag
  movenc: Add a min_frag_duration option
  rtsp: Set the default delay to 0.1 s for the RTSP/SDP/RTP demuxers
  libavformat: Set the default for the max_delay option to -1
  Generate manpages for AV{Format,Codec}Context AVOptions.
  doc/avconv: remove entries for AVOptions.
  ...

Conflicts:
	doc/Makefile
	doc/ffmpeg.texi
	doc/muxers.texi
	ffmpeg.c
	libavcodec/Makefile
	libavcodec/options.c
	libavcodec/vp8.c
	libavformat/options.c
	tests/fate/demux.mak
	tests/ref/fate/truemotion1-15
	tests/ref/fate/truemotion1-24

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-21 01:33:53 +01:00
Anton Khirnov a6733202cc lavf: make av_interleave_packet_per_dts() private.
There is no reason for it to be public, it's only meant to be used
internally.
2012-03-20 20:12:16 +01:00
Anton Khirnov 3c90cc2ef2 lavf: deprecate av_read_packet().
The caller can achieve the same effect (i.e. getting raw unparsed/mangled
packets) with av_read_frame() and AVFMT_FLAG_NOPARSE |
AVFMT_FLAG_NOFILLIN
2012-03-20 20:12:16 +01:00
Anton Khirnov 40b41be3fa lavf: use AVStream.discard to disable queueing attached pictures. 2012-03-20 06:53:44 +01:00
Anton Khirnov 01fcc42b90 lavf: requeue attached pictures after seeking.
This allows the caller to get them without special code even after
seeking before receiving any data.
2012-03-20 06:52:33 +01:00
Michael Niedermayer 479fb7b8af Merge remote-tracking branch 'qatar/master'
* qatar/master: (35 commits)
  fix space type in Changelog
  ZeroCodec Decoder
  RealAudio Lossless decoder
  rtpenc: Use AVFormatContext.packet_size instead of a private option
  url: Document the expected behaviour of url_read
  libavformat: Use AVFormatContext.probesize in init_input
  docs: Fix a stray reference to tags in the generic doxy on dicts
  cosmetics: Align some AVInput/OutputFormat declarations
  zmbv: check decompress result
  zmbv: correct indentation
  adpcm: convert adpcm_thp to bytestream2.
  adpcm: convert adpcm_yamaha to bytestream2.
  adpcm: convert adpcm_swf to bytestream2.
  adpcm: convert adpcm_sbpro to bytestream2.
  adpcm: convert adpcm_ct to bytestream2.
  adpcm: convert adpcm_ima_amv/smjpeg to bytestream2.
  adpcm: convert adpcm_ea_xas to bytestream2.
  adpcm: convert adpcm_ea_r1/2/3 to bytestream2.
  adpcm: convert ea_maxis_xa to bytestream2.
  adpcm: convert adpcm_ea to bytestream2.
  ...

Conflicts:
	Changelog
	libavcodec/Makefile
	libavcodec/adpcm.c
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/version.h
	libavcodec/zerocodec.c
	libavcodec/zmbv.c
	libavformat/riff.c
	libavformat/url.h
	tests/ref/fate/truemotion1-15
	tests/ref/fate/truemotion1-24

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-20 00:03:19 +01:00
Martin Storsjö 57151f8674 libavformat: Use AVFormatContext.probesize in init_input
This was forgotten in the transition from av_open_input_file to
avformat_open_input, see 603b8bc2a1.

This doesn't change anything for the default case where the
option isn't set, since PROBE_BUF_MAX is 1048576 (which was
used as max probe size earlier) while the default value for
the probesize option is 5000000, which for the probe function
is clipped to PROBE_BUF_MAX anyway.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-19 16:08:08 +02:00
Michael Niedermayer bae053fca4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: make compare() function compatible with POSIX bc
  Update Janne's email address.
  APIchanges: Replace Subversion revision numbers by Git hashes.
  bytestream: Eliminate one level of pointless macro indirection.
  xwd: convert to bytestream2.
  vqavideo: port to bytestream2 API
  Read preset files with suffix .avpreset
  prores: allow user to set fixed quantiser
  lavf: remove some disabled code.
  lavf: only set average frame rate for video.
  lavf: remove a pointless check.
  avcodec: add XBM encoder

Conflicts:
	Changelog
	cmdutils.c
	cmdutils.h
	doc/APIchanges
	libavcodec/Makefile
	libavcodec/avcodec.h
	libavcodec/version.h
	libavcodec/vqavideo.c
	libavformat/img2enc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-18 23:39:42 +01:00
Anton Khirnov 8bc5d90a7e lavf: remove some disabled code. 2012-03-17 22:37:55 +01:00
Anton Khirnov f35f8eeb0d lavf: only set average frame rate for video. 2012-03-17 22:36:56 +01:00
Anton Khirnov 9ade26ee91 lavf: remove a pointless check.
Timebase is already checked in avpriv_set_pts_info().
2012-03-17 22:36:48 +01:00
Michael Niedermayer 4257ce112c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dxa: remove useless code
  lavf: don't select an attached picture as default stream for seeking.
  avconv: remove pointless checks.
  avconv: check for get_filtered_frame() failure.
  avconv: remove a pointless check.
  swscale: convert hscale() to use named arguments.
  x86inc: add *mp named argument support to DEFINE_ARGS.
  swscale: convert hscale to cpuflags().

Conflicts:
	ffmpeg.c
	libswscale/x86/scale.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-16 01:36:49 +01:00
Anton Khirnov cd9a3c3512 lavf: don't select an attached picture as default stream for seeking. 2012-03-15 14:01:05 +01:00
Michael Niedermayer ad53c7f9ec lavf: Add system to seperate relative timestamps from absolute ones.
With this we can always know if a timestamp is based on added durations
from an unknown origin or if it is based on a correct timestamp (and possibly
added durations)
This should fix some bugs where this distinction was mixed up.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-09 19:36:12 +01:00
Michael Niedermayer 4cda8aa1c5 avformat_new_stream: fix initial last_dts value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-08 00:45:22 +01:00
Michael Niedermayer f095391a14 Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  cdxl demux: do not create packets with uninitialized data at EOF.
  Replace computations of remaining bits with calls to get_bits_left().
  amrnb/amrwb: Remove get_bits usage.
  cosmetics: reindent
  avformat: do not require a pixel/sample format if there is no decoder
  avformat: do not fill-in audio packet duration in compute_pkt_fields()
  lavf: Use av_get_audio_frame_duration() in get_audio_frame_size()
  dca_parser: parse the sample rate and frame durations
  libspeexdec: do not set AVCodecContext.frame_size
  libopencore-amr: do not set AVCodecContext.frame_size
  alsdec: do not set AVCodecContext.frame_size
  siff: do not set AVCodecContext.frame_size
  amr demuxer: do not set AVCodecContext.frame_size.
  aiffdec: do not set AVCodecContext.frame_size
  mov: do not set AVCodecContext.frame_size
  ape: do not set AVCodecContext.frame_size.
  rdt: remove workaround for infinite loop with aac
  avformat: do not require frame_size in avformat_find_stream_info() for CELT
  avformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3
  avformat: do not require frame_size in avformat_find_stream_info() for AAC
  ...

Conflicts:
	doc/APIchanges
	libavcodec/Makefile
	libavcodec/avcodec.h
	libavcodec/h264.c
	libavcodec/h264_ps.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/x86/dsputil_mmx.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-06 06:03:32 +01:00
Derek Buitenhuis 01606d10e6 libutvideo: Add Ut Video encoder wrapper
All colorspaces are supported.

Renamed libutvideo.cpp to libutvideodec.cpp.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-05 22:25:49 +01:00
Justin Ruggles 94cf64b81f cosmetics: reindent 2012-03-05 13:08:19 -05:00
Justin Ruggles 8c1d6ac66a avformat: do not require a pixel/sample format if there is no decoder
Also, do not keep trying to find and open a decoder in try_decode_frame() if
we already tried and failed once.

Fixes always searching until max_analyze_duration in
avformat_find_stream_info() when demuxing codecs without a decoder.
2012-03-05 13:08:18 -05:00
Justin Ruggles a7fa75684d avformat: do not fill-in audio packet duration in compute_pkt_fields()
Use the estimated duration only to calculate missing timestamps if needed.
2012-03-05 13:08:18 -05:00
Justin Ruggles 6c65cf58fd lavf: Use av_get_audio_frame_duration() in get_audio_frame_size()
Also, do not give AVCodecContext.frame_size priority for muxing.

Updated 2 FATE references:
dxa-feeble - adds 1 audio frame that is still within 2 seconds as specified
             by -t 2 in the FATE test
wmv8-drm-nodec - durations are not needed. previously they were estimated
                 using the packet size and average bit rate.
2012-03-05 13:08:18 -05:00
Justin Ruggles 9c365fe8ae avformat: do not require frame_size in avformat_find_stream_info() for CELT
In Ogg/CELT, frame_size is found in the same place as the sample_rate and
channels, so we do not need to force the frame_size to be parsed.
2012-03-05 13:08:16 -05:00
Justin Ruggles fbc8c59679 avformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3
It was only needed to avoid a bad time base (and thus non-monotone timestamps)
for stream copy to avi.
2012-03-05 13:08:16 -05:00