Commit Graph

11285 Commits

Author SHA1 Message Date
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
Diego Biurrun
11d4e92ed9 avformat: Remove non-compiling and/or silly commented-out printf/av_log statements 2012-10-01 10:24:28 +02:00
Michael Niedermayer
14fd34d73b movenc: fix edit list for the case of negative pts.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-01 04:53:40 +02:00
Michael Niedermayer
594b1fcb28 mov: add av_dlog() to dump edit lists.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-29 18:50:18 +02:00
Michael Niedermayer
3ceeb01c06 mov: only print multiple edit lists warning for actually unsupported cases
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-29 18:44:35 +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
b96dc093ea Merge remote-tracking branch 'qatar/master'
* qatar/master:
  wmalosslessdec: increase channel_coeffs/residues size
  wmalosslessdec: increase WMALL_BLOCK_MAX_BITS to 14.
  lagarith: check count before writing zeros.
  wmaprodec: check num_vec_coeffs for validity
  avidec: use actually read size instead of requested size
  avidec: return 0, not packet size from read_packet().

Conflicts:
	libavcodec/lagarith.c
	libavcodec/wmalosslessdec.c
	libavcodec/wmaprodec.c
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-29 15:11:34 +02:00
Anton Khirnov
0af49a63c7 avidec: use actually read size instead of requested size
Fixes CVE-2012-2788
2012-09-29 09:27:59 +02:00
Anton Khirnov
eeade678f0 avidec: return 0, not packet size from read_packet(). 2012-09-29 09:27:51 +02:00
Michael Niedermayer
c0209facd2 mov: remove default of 1024 sample skip for aac.
It is not correct in all cases and it is less predictable than a skip of 0
for user applications.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 20:30:37 +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
2acb5cd907 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libopus: Remap channels using libopus' internal remapping.
  Opus decoder using libopus
  avcodec: document the use of AVCodecContext.delay for audio decoding
  vc1dec: add flush function for WMV9 and VC-1 decoders
  http: Increase buffer sizes to cope with longer URIs
  nutenc: const correctness for ff_put_v_trace/put_s_trace function arguments
  h264_refs: Fix debug tprintf argument types
  golomb: const correctness for get_ue()/get_se() function arguments
  get_bits: const correctness for get_bits_trace()/get_xbits_trace() arguments

Conflicts:
	Changelog
	libavcodec/Makefile
	libavcodec/version.h
	libavformat/http.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 13:54:40 +02:00
Michael Niedermayer
7ed9ec033f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dwt: Drop unused functions spatial_compose{53|97}i()
  nutdec: Remove unused and broken debug function stub
  avcodec: Drop long-deprecated imgconvert.h header
  Add Opus support to the Ogg muxer.
  Add Opus codec id and codec description.
  avformat: Identify anonymous AVIO typedef structs.

Conflicts:
	libavcodec/avcodec.h
	libavcodec/codec_desc.c
	libavcodec/imgconvert.h
	libavcodec/version.h
	libavformat/oggenc.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 05:11:19 +02:00
Michael Niedermayer
b4c753487c asfenc: avoid negative timestamps
Fixes Ticket1606

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 02:40:53 +02:00
Duncan Salerno
8bd324e9e4 http: Increase buffer sizes to cope with longer URIs
Use the MAX_URL_SIZE define where applicable. Increase buffer
sizes for all buffers that need to fit a long pathname - buffers
that need to fit only the hostname (and other short strings, but
not the pathname - such as "headers" in http_connect) are kept
at 1024 bytes for now.

Also increase the max line length in http_read_header, since it
might need to contain a full url for Location: redirects.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-28 00:09:38 +03:00
Marton Balint
13f0cd681e mxfdec: allow container_ul to override codec_ul if codec is A-law
Fixes some DNXHD files generated by AVID TM, where codec UL was set to A-law
meanwhile the real audio codec was PCM S16. According to SMPTE RP 224, A-law is
the default value for sound essence parameters therefore we should handle it
specially.

Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-27 21:28:35 +02:00
Diego Biurrun
bc66827fb1 nutenc: const correctness for ff_put_v_trace/put_s_trace function arguments 2012-09-27 19:32:47 +02:00
Michael Niedermayer
279ae1cd72 lavf: move fields that appear to be intended as public API to the correct section
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-27 18:19:01 +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
Nathan Caldwell
bcc1f7caeb Add Opus support to the Ogg muxer.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-09-27 10:48:35 +02:00
Dale Curtis
0575772fa0 avformat: Identify anonymous AVIO typedef structs.
Anonymous typedef structs prevent forward declaration, this
change gives the AVIOContext and AVIOInterruptCB structures
a name.  These structures are now in line with other common
structures such as AVFormatContext and AVCodecContext.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-09-27 09:14:22 +02:00
Clément Bœsch
a714150827 lavf/movenc: add faststart option. 2012-09-27 08:59:36 +02:00
Clément Bœsch
f379a108a4 lavf/movenc: make mov_write_stco_tag() not use the offset pos for mode64 heuristic.
At the moment, the moov header is written at the end of the file, so we
can use the current offset (which focus on the end of the mdat already
written) to guess if 64-bits offset will be required or not.

Though, the next commits will make possible the writing of this table at
the beginning, so this heuristic can't work. As a consequence, we check
all the values within the potential offset table for any value >
32-bits.
2012-09-27 08:59:36 +02:00
Clément Bœsch
e17a2aba25 lavf/movenc: add get_moov_size and use it in fragment code.
This function will be re-used in the following commits.
2012-09-27 08:59:36 +02:00
Jean First
d37044647f file: set the return value type for lseek to off_t
fixes a bug introduced with 4ed5ac50d3

Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-27 01:47:49 +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
Diego Biurrun
93e81ee81c nutdec: const correctness for get_v_trace/get_s_trace function arguments 2012-09-26 19:10:13 +02:00
Martin Storsjö
69673138c5 rtpdec: Remove a useless ff_ prefix from a static symbol
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-26 19:05:18 +03:00
Dmitry Samonenko
b6bf1490da rtpdec: Support depacketizing speex
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-26 19:05:10 +03:00
Dmitry Samonenko
490ae95aa8 rtpenc: Add support for packetizing speex
This packetization scheme simply places the full packets into the
RTP packet without any extra header bytes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-26 19:04:57 +03:00
Michael Niedermayer
5c4e2e8755 nutenc: avoid negative timestamps
Fixes Ticket1468

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 15:56:06 +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
e9350c44ad nutenc: remove outdated fixme
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-26 15:53:17 +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
d9d56712e9 oggparsetheora: print error when failing on unknown header
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 17:32:11 +02:00
Michael Niedermayer
abcaacf1ac Merge remote-tracking branch 'qatar/master'
* qatar/master:
  pthread: make sure AVFrame.extended_data is set properly.
  libfdk-aac: reindent after last commit
  libfdk-aac: Limit to supported sample rates.
  cbrt_tablegen: Include libm.h
  oggparsetheora: make it more robust
  ogg: prevent NULL pointer deference in theora gptopts

Conflicts:
	libavformat/oggparsetheora.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 16:11:34 +02:00
Michael Niedermayer
d3ef2da59d oggdec: add missing () for OGG_NOGRANULE_VALUE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 16:03:55 +02:00
Michael Niedermayer
0842e32f99 Merge commit 'd1f05dd18375f2f8e68372edee11436927e43ba8'
* commit 'd1f05dd18375f2f8e68372edee11436927e43ba8':
  ogg: calculate the start position once all the headers are parsed

Conflicts:
	libavformat/oggdec.c
	libavformat/oggparseskeleton.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 16:00:09 +02:00
Michael Niedermayer
4c273eb64c oggdec: print a warning if the number of headers mismatch expectations.
This is based on:
	commit 7751e4693d
	Author: Luca Barbato <lu_zero@gentoo.org>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 15:34:58 +02:00
Michael Niedermayer
cc4deafed1 oggdec: print error when headers couldnt be parses successfully
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-25 15:22:05 +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
Luca Barbato
d1f05dd183 ogg: calculate the start position once all the headers are parsed
The fisbone packets can be muxed in any order as long the last one
comes before the first data packet.
2012-09-24 22:35:29 +02:00
Luca Barbato
7751e4693d ogg: check that the expected number of headers had been parsed
Not having the header for a codec is a tell-tale of a broken file.
2012-09-24 22:35:29 +02:00
Luca Barbato
0336dea2ef oggparsetheora: make it more robust 2012-09-24 22:35:29 +02:00
Michael Niedermayer
bb146bb57b ogg: prevent NULL pointer deference in theora gptopts
Additional safety in case a special ogg stream is crafted
with the proper number of

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-24 22:35:29 +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
Michael Niedermayer
ff584803b7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtp: Packetization of JPEG (RFC 2435)
  smoothstreamingenc: Copy the SAR on the AVStreams as well

Conflicts:
	Changelog
	libavformat/rtpenc.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-24 13:54:24 +02:00
Anton Khirnov
11d1ca4b2c Use avcodec_free_frame() to free AVFrames. 2012-09-24 12:31:25 +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
Samuel Pitoiset
cee1950bbb rtp: Packetization of JPEG (RFC 2435) 2012-09-23 21:58:41 +03:00
Martin Storsjö
71908f0838 smoothstreamingenc: Copy the SAR on the AVStreams as well
This is required in chained muxers, if the SAR happens to be set.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-23 21:28:58 +03:00
Reimar Döffinger
033f53fb8f Document why we always send a Range HTTP header.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-09-23 15:40:17 +02:00
Clément Bœsch
2599541b3d WebVTT demuxer and decoder. 2012-09-23 15:24:08 +02:00
Dmitry Samonenko
697ea4fccf Introducing speex RTP demuxing (RFC 5574)
RTPDynamicProtocolHandler for speex is added. Initial support for
speex depacketization from RTP stream comes with it.
Currently, only codec audio rate can be applied based on sdp:
* Narrowband    ( 8K)
* Wideband      (16K)
* Ultrawideband (32K)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-23 14:20:13 +02:00
Dmitry Samonenko
b024c41e1e Add initial support for speex RTP packetization (RFC 5574)
* libspeex audio codec is no longer considered unsupported
  when using rtp as output format.
* SDP rtpmap is added for speex payload, formatted according to RFC

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-23 14:08:48 +02:00
Michael Niedermayer
f0bb88e2bc Revert "http: only send range header when necessary"
This reverts commit 48cf0f1c18.
This can cause problems with seekability detection
2012-09-23 13:21:35 +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
Duncan Salerno
48cf0f1c18 http: only send range header when necessary
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-23 02:36:08 +02:00
Duncan Salerno
0a8cc1179a http: larger buffer for long URIs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-23 02:35:42 +02:00
rogerdpack
641c0eea0b bitmap header lookup: add code comment
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-23 02:12:34 +02:00
Michael Niedermayer
697b476c07 wav: Fix DTS detection
Fixes Ticket1474

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-23 01:22:16 +02:00
Michael Niedermayer
a9f522d1b7 lavf: document request_probe properly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-23 01:22:16 +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
28e88a24f6 rtsp: fix "warning: ret may be used uninitialized in this function"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-22 04:49:04 +02:00
Michael Niedermayer
0079232299 rtsp: kill a pointer type warning (void **) vs. (AVFormatContext **)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-22 04:45:12 +02:00
Clément Bœsch
ea5bd7ea6f lavf/oggdec: check for begin-of-stream flag in case of chained streams.
Fix Ticket #1617, revealing a regression I introduced in 8f3eebd.

We need to make sure no stream is added in between Ogg context save and
restore operations (because it would likely lead to a mismatch between
ogg->nstreams and AVFormatContext->nb_streams after the restore op).
This is the reason the ogg->state check is added in ogg_new_stream().
Before this patch, checking for ogg->headers was preventing this:
ogg->headers is always set before any ogg save/restore (though, it was
also preventing from creating the stream when necessary).
2012-09-22 00:40:51 +02:00
Matthieu Bouron
41f7e0649f mxf: export ff_mxf_get_samples_per_frame to lavf
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-21 16:20:38 +02:00
Clément Bœsch
7bc70930dd lavf/movenc: add F4V flavor. 2012-09-21 15:14:11 +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
87b017a298 matroskadec: fix a sanity check. 2012-09-21 09:15:07 +02:00
Anton Khirnov
bdb939ad73 matroskadec: only return corrupt packets that actually contain data
Fixes bug 372.
2012-09-21 09:15:01 +02:00
Anton Khirnov
1cc569ddda lavf: zero data/size of the packet passed to read_packet(). 2012-09-21 09:14:37 +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
Michael Niedermayer
a6ec1e49f6 matroskadec: matroska_parse_rm_audio: remove unused parameter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 23:43:20 +02:00
Michael Niedermayer
6d87781758 mp3dec: fix seeking without xing TOC
fixes regression from the xing toc support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 22:00:52 +02:00
Michael Niedermayer
5864ce13d1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mp3dec: read Xing frame TOC index
  mp3dec: use named constants for Xing header flags
  libx264: add support for nal-hrd, required for Blu-ray streams.
  mov: support random access point grouping
  matroskadec: properly support BlockDuration

Conflicts:
	libavcodec/libx264.c
	libavformat/isom.h
	libavformat/matroskadec.c
	libavformat/mov.c
	libavformat/mp3dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 21:46:35 +02:00
Michael Niedermayer
8c51ea5489 Merge commit 'c831ebf61629d219ebcaa9f02d262e67aad09d83'
* commit 'c831ebf61629d219ebcaa9f02d262e67aad09d83':
  matroskadec: split frame parsing
  matroskadec: split laces parsing

Conflicts:
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 20:39:47 +02:00
Michael Niedermayer
b8044972c4 Merge commit '117d8c6d1f1c187ffc6098d9618457e00534e013'
* commit '117d8c6d1f1c187ffc6098d9618457e00534e013':
  matroska: implement support for ProRes
  matroska: implement support for ALAC

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 19:43:38 +02:00
Michael Niedermayer
0da50055eb matroskadec: fix typo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 19:12:07 +02:00
Michael Niedermayer
6902c3acb0 Merge commit '870e75524aa0d00ebcd1d15589c8d29b84af1565'
* commit '870e75524aa0d00ebcd1d15589c8d29b84af1565':
  matroskadec: validate lace_size when parsed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 19:11:46 +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
Michael Niedermayer
a16c512374 Merge commit 'c9a39cec70603f662f4c326b21b11c4f0112079a'
* commit 'c9a39cec70603f662f4c326b21b11c4f0112079a':
  matroskadec: return meaningful errors in matroska_decode_buffer
  matroskadec: fix incorrect unsigned->signed conversion

Conflicts:
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 13:40:47 +02:00
Michael Niedermayer
1df2e3c707 Merge commit '8d4dd55c37b14ecea596f3477b35bf6c20688d8b'
* commit '8d4dd55c37b14ecea596f3477b35bf6c20688d8b':
  matroskadec: refactor matroska_decode_buffer

Conflicts:
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 13:32:43 +02:00
Michael Niedermayer
db0087dc1d mxfdec: fix index_tables check in mxf_read_seek()
Approved-by: Tjoppen
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 12:54:00 +02:00
Michael Niedermayer
61ced71d79 Merge commit '581281e242609a222233a2e5538b89dfb88fb18e'
* commit '581281e242609a222233a2e5538b89dfb88fb18e':
  matroskadec: check realloc in lzo encoding
  matroska: honor error_recognition on unknown doctypes
  tiffdec: Add support for GRAY16LE.
  tiffenc: Add support for little endian RGB48 and GRAY16
  mpeg4: support frame parameter changes with frame-mt
  mpegvideo: check ff_find_unused_picture() return value for errors
  mpegvideo: release frame buffers before freeing them
  configure: msvc: default to 'lib' as 'ar' tool
  build: support some non-standard ar variants

Conflicts:
	libavcodec/h263dec.c
	libavcodec/mpegvideo.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 03:20:29 +02:00
Matthieu Bouron
d57ca5e5a8 mxfenc: support 23.976 and 24 frame rates
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 02:40:18 +02:00
Matthieu Bouron
906a263813 mxfenc: factorize samples per frame code
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-20 02:40:10 +02:00
Michael Niedermayer
168bc5f2c5 mov: fix 32/64 format type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-19 23:36:35 +02:00
Anton Khirnov
50d1f4437b mp3dec: read Xing frame TOC index 2012-09-19 20:59:45 +02:00
Anton Khirnov
2d1a1a7f62 mp3dec: use named constants for Xing header flags 2012-09-19 20:59:44 +02:00
Yusuke Nakamura
d17d0ec8c2 mov: support random access point grouping
Frames described by this grouping are the starter of a closed or
an open GOP.
This is useful for open GOP of H.264 stream which is not described
by sync sample atom.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-09-19 20:34:15 +02:00
Luca Barbato
c831ebf616 matroskadec: split frame parsing 2012-09-19 20:34:14 +02:00
Luca Barbato
117d8c6d1f matroska: implement support for ProRes
Support Matroska native formatting.

On demuxing prepend a Frame container atom (32bit big endian encoded
frame size and 'icpf' string).
On muxing remove it.
2012-09-19 20:34:14 +02:00
Luca Barbato
870e75524a matroskadec: validate lace_size when parsed
Stricter validation, explicitly exit on misparsing and some error
forwarding from the ebml parsing functions used.
2012-09-19 20:34:14 +02:00
Luca Barbato
c9a39cec70 matroskadec: return meaningful errors in matroska_decode_buffer 2012-09-19 20:34:14 +02:00
Luca Barbato
8d4dd55c37 matroskadec: refactor matroska_decode_buffer
Make MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP behave like
the other encodings and spare few lines of boilerplate code.
2012-09-19 20:34:14 +02:00
Luca Barbato
7d8431004a matroskadec: properly support BlockDuration 2012-09-19 20:34:14 +02:00
Luca Barbato
2d0e7713f9 matroskadec: split laces parsing 2012-09-19 20:34:14 +02:00
Moritz Bunkus
8071dca3d5 matroska: implement support for ALAC
Support Matroska native formatting.

On demuxing reconstruct the 36-bytes QuickTime atom that the ALAC
decoder expects by prepending the "atom size", "tag" and
"tag version" fields missing from the Matroska's CodecPrivate
element.

On muxing remove the initial 12 bytes

Sample files are available:
http://www.bunkus.org/videotools/mkvtoolnix/samples/alac/alac-in-matroska.mka
and the CoreAudio file it was created from with today's mkvmerge:
http://www.bunkus.org/videotools/mkvtoolnix/samples/alac/alac-in-matroska-source.caf

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-09-19 20:34:14 +02:00
Dale Curtis
df1d84121b matroskadec: fix incorrect unsigned->signed conversion 2012-09-19 20:34:14 +02:00
Luca Barbato
581281e242 matroskadec: check realloc in lzo encoding
Make all the compression encodings behave the same way.
2012-09-19 20:34:13 +02:00
Luca Barbato
cd4739c4f2 matroska: honor error_recognition on unknown doctypes 2012-09-19 20:34:13 +02:00
Michael Niedermayer
67d501b4f1 Merge commit '1b3439b3055b083df51d7f7838ecc6b3f708b15c'
* commit '1b3439b3055b083df51d7f7838ecc6b3f708b15c':
  mpegvideo: move frame size dependent memory management to separate functions
  configure: add --toolchain option
  configure: Make the smoothstreaming muxer enable the ismv muxer
  smoothstreaming: Export the mp4 codec tags
  mov: check for EOF in long lasting loops
  avcodec: cleanup utils.c
  binkaudio: remove unneeded GET_BITS_SAFE macro
  binkaudio: use float sample format
  binkaudio: use a different value for the coefficient scale for the DCT codec

Conflicts:
	configure
	libavcodec/mpegvideo.c
	libavcodec/utils.c
	libavformat/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-19 15:13:53 +02:00
Michael Niedermayer
8d07742cb1 avidec: workaround aac with broken block align
Fixes Ticket1742

Based on patch by: Nikola Vranic <nikola.vranic@rt-rk.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-18 22:39:54 +02:00
Martin Storsjö
84cc314e40 smoothstreaming: Export the mp4 codec tags
This fixes stream copy from a format that already has incompatible
codec tags set. The chained ismv muxer exports this same codec tag
list, so set it on this one as well, to allow the caller (and
lavf common code) to set them correctly.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-18 17:59:57 +03:00
Luca Barbato
9888ffb1ce mov: check for EOF in long lasting loops
A quite widespread pattern in the demuxer is read a 32bit unsigned
integer and then loop till this value is reached.

Checking for EOF prevents pathological situations.
2012-09-18 15:32:52 +02:00
Benjamin Larsson
6a08955c10 flvenc: silence bogus warning
The compiler fails to figure out that enc->codec_type can only
have 3 different values.
Thus when an if/else is encountered it triggers on the possibility
of the else case has not initialized the flags variable.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-09-18 10:31:04 +02:00
Michael Niedermayer
a1fb2b935a nsvdec: change 2 commented assert() to av_assert()
they keep showing up if i grep for non av assert()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-18 05:08:32 +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
Clément Bœsch
049ce4facb id3v2: strdup the genre name explicitly.
It would have been done anyway in the av_dict_set() call.

This simplifies the code and avoid a warning because of assigning a
const string from ff_id3v1_genre_str to a non-const variable.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-17 15:48:20 +02:00
Clément Bœsch
ffdd2e9144 lavf/id3v2: do not export empty fields.
This also avoids a memleak.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-17 15:48:20 +02:00
Michael Niedermayer
291b220377 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: flush filtered frames before reconfiguring filters
  mov: stsd entries must be at least 16 byte
  mov: detect EOF in mov_read_dref()
  file: return proper error on seek failures

Conflicts:
	libavformat/file.c
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-17 15:15:43 +02:00
Clément Bœsch
094991eb69 lavf/oggdec: reword stream creation error message. 2012-09-16 18:28:52 +02:00
Clément Bœsch
23f6420026 lavf/oggdec: reindent and comment blocks. 2012-09-16 18:28:51 +02:00
Clément Bœsch
a218c5ebd2 lavf/oggdec: make stream replacement less convoluted.
Also re-use the allocated buffer instead of re-allocating a new one.
2012-09-16 18:28:15 +02:00
Clément Bœsch
e18ea76523 lavf/oggdec: more explicit zeroing of the new ogg stream. 2012-09-16 18:28:14 +02:00
Clément Bœsch
3a89553347 lavf/oggdec: rework allocations in ogg_new_streams(). 2012-09-16 18:27:58 +02:00
Michael Niedermayer
a5ea623b36 mov: stsd entries must be at least 16 byte
Fix near infinite loop in stsd parsing.
Bug found by: Diana Elena Muscalu

The size is unsigned according the specification.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-09-16 16:53:06 +02:00
Clément Bœsch
edca80387c lavf/oggdec: simplify destroying streams with chained audio streams.
nstreams is assumed to be 1 at that point, so the loop is pointless.
2012-09-16 16:52:06 +02:00
Clément Bœsch
277ddf127d lavf/oggdec: rename str to sid.
"str" is misleading here (it's often used for string). "sid" makes more
sense to identify a stream id.
2012-09-16 16:52:06 +02:00
Clément Bœsch
e1ca1dd71b lavf/oggdec: remove a comment not matching anything. 2012-09-16 16:52:06 +02:00
Clément Bœsch
bf8bfc6a11 lavf/oggdec: inline ogg_get_headers().
There is no point in a distant definition of a small function like this
used only once.

Additional spacing to distinguish better the block.
2012-09-16 16:52:06 +02:00
Michael Niedermayer
9db67bedf0 mov: detect EOF in mov_read_dref()
Avoid a near infinite loop.
Issue discovered by cosminamironesei.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-09-16 16:31:03 +02:00
Luca Barbato
4ed5ac50d3 file: return proper error on seek failures 2012-09-16 15:37:14 +02:00
Michael Niedermayer
744e4429cf mp3enc: merge mp2/mp3_write_trailer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-16 14:37:50 +02:00
Michael Niedermayer
197bbcf44c mp3enc: move mp3_update_xing() down
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-16 14:31:58 +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
Clément Bœsch
ca81e3b6e7 lavf/mkv: prefix video stereo arrays with ff_. 2012-09-16 02:58:40 +02:00
Alexander Strasser
49f3b331c7 lavf/segment: Use distinct IDs for list type ext & csv
Remove a bogus warning when using segment_list_type csv.

The LIST_TYPE_EXT constant is only used internally, so it can
be removed when the feature (segment_list_type ext) gets removed.

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2012-09-15 22:58:12 +02:00
Alexander Strasser
3245be95ac lavf/segment: Rename variable in print_csv_escaped_str()
Rename a local variable to make the code more self-explanatory.

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2012-09-15 22:58:11 +02:00
Alexander Strasser
bac1b31bf6 lavf/segment: Simplify CSV field quoting code
Should also be faster (though I doubt that hardly ever matters
for the usage here).

Also remove the pointer copy. Since we do not need to reset the
pointer to the start of the string, it is not needed anymore.

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2012-09-15 22:55:21 +02:00
Andrey Utkin
aefed6ca87 udp: pick params from AVOptions also
This updated version does not deviate from previous behavior on default value of 'buffer_size'

I skipped porting 'sources', 'block' options for now as they're parsed seriously. So i added TODO remarks.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 22:13:21 +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
7040c9fac2 mp3enc: write Xing TOC
Based on the code by:
Peter Belkner <pbelkner@snafu.de>,
Michael Niedermayer <michaelni@gmx.at>,
Clément Bœsch <clement.boesch@smartjog.com>,
Reimar Döffinger <Reimar.Doeffinger@gmx.de>, and
Tobias Rapp <t.rapp@noa-audio.com>
Alex Converse <alex.converse@gmail.com>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-15 18:25:34 +02:00
Clément Bœsch
ca8e39dd0d mp3enc: support MPEG-2 and MPEG-2.5 in Xing header. 2012-09-15 18:25:22 +02:00
Reimar Döffinger
6365e4db79 mp3enc: downgrade some errors in writing Xing frame to warnings
Also clarify the meaning of the log message.
2012-09-15 18:25:15 +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
Stefano Sabatini
5d1203f063 avio: flush the internal buffer in avio_close()
This is consistent with stdio, and thus what people would naturally
expect.
2012-09-15 18:24:49 +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
Derek Buitenhuis
1c56cdad33 riff: Add SVQ3 fourcc
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-09-14 14:12:52 -04:00
Derek Buitenhuis
fef412a24d riff: Add SVQ3 fourcc
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-14 19:48:45 +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
bc3d5173cc libavformat.v: export ffurl_protocol_next
This is used by avidemux, and is likely usefull to others too.

Patch by: gruntster (Avidemux Rev 7990 — 2012-05-30 13:02:27)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-13 16:21:25 +02:00
Michael Niedermayer
e3e09f2bad Merge remote-tracking branch 'qatar/master'
* qatar/master:
  os_support: Choose between direct.h and io.h using a configure check
  os_support: Include io.h instead of direct.h on mingw32ce
  x86: ac3dsp: Only refer to the ac3_downmix_sse symbol if it has been declared
  swscale: Remove two bogus asserts
  ac3: move ac3_downmix() from dsputil to ac3dsp
  lavr/audio_mix_matrix: acknowledge the existence of LFE2.
  mlp_parser: avoid mapping multiple disctinct TrueHD channels to the same Libav channel.
  lavu/audioconvert: add a second low frequency channel.

Conflicts:
	doc/APIchanges
	libavcodec/ac3dsp.c
	libavcodec/ac3dsp.h
	libavcodec/mlp_parser.c
	libavutil/audioconvert.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-13 15:35:50 +02:00
Michael Niedermayer
c942e8b1d7 Merge commit '07584eaf4a95db3f11d3bc411f9786932829e82b'
* commit '07584eaf4a95db3f11d3bc411f9786932829e82b':
  mpegts: check substreams before discarding
  Add a smooth streaming segmenter muxer
  file: Add an avoption for disabling truncating existing files on open
  img2dec: always close AVIOContexts
  rtpdec_jpeg: Error out on other unsupported type values as well
  rtpdec_jpeg: Disallow using the reserved q values
  rtpdec_jpeg: Fold the default qtables case into an existing if statement
  rtpdec_jpeg: Store and reuse old qtables for q values 128-254
  rtpdec_jpeg: Simplify the calculation of the number of qtables
  rtpdec_jpeg: Add more comments about the fields in the SOF0 section
  rtpdec_jpeg: Clarify where the subsampling magic numbers come from
  rtpdec_jpeg: Don't use a bitstream writer for the EOI marker
  rtpdec_jpeg: Don't needlessly use a bitstream writer for the header
  rtpdec_jpeg: Simplify writing of the jpeg header
  rtpdec_jpeg: Merge two if statements
  rtpdec_jpeg: Write the DHT section properly

Conflicts:
	libavformat/Makefile
	libavformat/allformats.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-13 15:22:16 +02:00
Martin Storsjö
ca6b544ac9 os_support: Choose between direct.h and io.h using a configure check
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-13 14:56:54 +03:00
Martin Storsjö
7b07fab567 os_support: Include io.h instead of direct.h on mingw32ce
Windows CE doesn't have neither mkdir nor _mkdir officially (only
CreateDirectoryW), but mingw32ce has compat wrappers with these names
(declared in io.h since direct.h is unavailable).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-13 13:52:50 +03:00
Christian Schmidt
07584eaf4a mpegts: check substreams before discarding
Allow to extract the AC3 core from TrueHD with the "copy" codec.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-09-12 23:43:53 +02:00
Martin Storsjö
62c9ae11a7 Add a smooth streaming segmenter muxer
This muxer splits the output from the ismv muxer into individual
files, in realtime.

The same can also be done by the standalone tool ismindex, but this
muxer is needed for doing it in realtime (especially for live
streams that need extra handling for updating the lookahead fields
in the fragment headers).

Using this muxer, one can deliver live smooth streaming from a
normal static file web server. (Using ismindex, one can deliver
premade smooth streaming files from a static file web server,
or prepare files for serving with IIS.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 23:42:16 +03:00
Martin Storsjö
29a9b12b10 file: Add an avoption for disabling truncating existing files on open
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 23:42:09 +03:00
Michael Niedermayer
2de8877689 asfdec: invert SAR
It appears this was wrong

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-12 20:35:09 +02:00
Tomas Härdin
5e3572893d img2dec: always close AVIOContexts
Zero sized files would cause the contexts to leak away.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-09-12 14:31:09 +02:00
Carl Eugen Hoyos
7680d99b43 Fix muxing mjpeg in swf. 2012-09-12 13:08:27 +02:00
Martin Storsjö
c3bcd22ed3 rtpdec_jpeg: Error out on other unsupported type values as well
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 12:10:56 +03:00
Martin Storsjö
1743938df1 rtpdec_jpeg: Disallow using the reserved q values
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 12:10:45 +03:00
Martin Storsjö
1de9317bd0 rtpdec_jpeg: Fold the default qtables case into an existing if statement
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 12:10:32 +03:00
Martin Storsjö
a218deb856 rtpdec_jpeg: Store and reuse old qtables for q values 128-254
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 12:10:05 +03:00
Martin Storsjö
a252649059 rtpdec_jpeg: Simplify the calculation of the number of qtables
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 12:09:57 +03:00
Martin Storsjö
cbaa9eeda3 rtpdec_jpeg: Add more comments about the fields in the SOF0 section
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 12:09:30 +03:00
Martin Storsjö
31adff08a1 rtpdec_jpeg: Clarify where the subsampling magic numbers come from
Write out the numbers the way they are constructed, not just the
final values.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 12:09:21 +03:00
Martin Storsjö
c64d2a63df rtpdec_jpeg: Don't use a bitstream writer for the EOI marker
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 12:09:02 +03:00
Martin Storsjö
20f325f320 rtpdec_jpeg: Don't needlessly use a bitstream writer for the header
Everything written with this bitstream writer is 8/16 bit units
(except for a pair of 4 bit values), so using a bitstream writer
isn't necessary.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 12:08:33 +03:00
Martin Storsjö
43957fcc71 rtpdec_jpeg: Simplify writing of the jpeg header
Generalize writing of any number of qtables. Don't manually write
16 bit values in two separate calls.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 12:08:09 +03:00
Martin Storsjö
932d8300d3 rtpdec_jpeg: Merge two if statements
This makes the code more readable and robust.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 12:07:57 +03:00
Martin Storsjö
7ef4323405 rtpdec_jpeg: Write the DHT section properly
Currently the size header of the generated DHT section is
incorrect, making the mjpeg decoder just skip it. Since the
written huffman tables are the default ones, this failure had
gone undetected.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-12 12:07:29 +03:00
Michael Niedermayer
23e9e5c7d9 rtmpproto: reorder some expressions to fix compilation with clang without optimizations
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-12 05:17:52 +02:00
Stefano Sabatini
e592fd0ed1 lavf/flvenc: convert commented debug log to an av_dlog call
Also add some additional info (DTS and DTS time).
2012-09-11 18:58:19 +02:00
Michael Niedermayer
ec7946853a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec_jpeg: Add support for default quantizers
  x86: dsputil: Move specific optimization settings out of global init function
  avplay: get rid of ugly casts in the options table
  avplay: fix prototypes for option callbacks.
  flvdec: always set AVFMTCTX_NOHEADER.
  file: Use a normal private context for storing the file descriptor
  configure: Adjust the xgetbv instrinsic check
  configure: Add --disable-inline-asm command line option
  configure: Don't try to enable the log2 function on msvcrt

Conflicts:
	configure
	ffplay.c
	libavcodec/x86/dsputil_mmx.c
	libavformat/file.c
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-11 15:24:22 +02:00
Samuel Pitoiset
55e778bebd rtpdec_jpeg: Add support for default quantizers
Generate quantization tables when they are not present in the
first chunk.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-11 11:53:08 +03:00
Anton Khirnov
ee0dadc109 flvdec: always set AVFMTCTX_NOHEADER.
New streams may be created at any time, e.g. on codec change.
2012-09-11 09:13:29 +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
Stefano Sabatini
00d516454c lavf/segment: add segment_list_flags option
Allow to specify options affecting the segment list generation.

In particular: add +live and +cache flags.

For a full discussion read trac ticket #1642:
http://ffmpeg.org/trac/ffmpeg/ticket/1642

Also add live M3U8 generation example.
2012-09-11 01:24:54 +02:00
Michael Niedermayer
b3b27b63a0 mpegtsenc: add forgotten ()
Fixes integer overflow

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-10 20:57:23 +02:00
Martin Storsjö
0697d81269 file: Use a normal private context for storing the file descriptor
Previously the file descriptor was stored in the priv_data pointer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-10 19:49:41 +03:00
Sébastien Brochet
e14725cecc add OTF support for attachments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-10 17:08:18 +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
108957c661 avidec/guess_ni_flag: fix harmless integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-10 16:56:59 +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
bff2afb3e9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: dsputil: Only compile motion_est code when encoders are enabled
  mem: fix typo in check for __ICC
  fate: mp3: drop redundant CMP setting
  rtp: Depacketization of JPEG (RFC 2435)
  Rename ff_put_string to avpriv_put_string
  mjpeg: Rename some symbols to avpriv_* instead of ff_*
  yadif: cosmetics

Conflicts:
	Changelog
	libavcodec/mjpegenc.c
	libavcodec/x86/Makefile
	libavfilter/vf_yadif.c
	libavformat/version.h
	libavutil/mem.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-10 14:06:20 +02:00
Samuel Pitoiset
3c19815416 rtp: Depacketization of JPEG (RFC 2435)
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-09 22:22:21 +03:00
Derek Buitenhuis
16c03f2e91 file: Add S_ISFIFO compatability macro
Not all systems have S_ISFIFO.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-09 20:23:14 +02:00
Michael Niedermayer
07108cafc6 gxfenc: assert that the to be written data has not been truncated.
Otherwise out of array reads would happen later

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-09 14:31:44 +02:00
Michael Niedermayer
eb336cb881 gxfenc: dont duplicate buffer size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-09 14:31:06 +02:00
Michael Niedermayer
59fdf543d5 smush: read subversion for version==1 too.
This avoids a gcc warning, otherwise it should have no effect.
its a bit more consistent too

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-09 02:36:57 +02:00
Michael Niedermayer
b86e18fe46 yuv4mpeg: fix potential alignment bug
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-08 13:37:35 +02:00
Michael Niedermayer
7beadfe1f7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mov_chan: Only set the channel_layout if setting it to a nonzero value
  mov_chan: Reindent an incorrectly indented line
  mp2 muxer: mark as AVFMT_NOTIMESTAMPS.
  x86: float_dsp: fix ff_vector_fmac_scalar_avx() on Win64
  x86: more specific checks for availability of required assembly capabilities
  x86: avcodec: Drop silly "_mmx" suffix from dsputil template names
  fate: Drop redundant setting of FUZZ to 1
  cavsdsp: set idct permutation independently of dsputil
  x86: allow using add_hfyu_median_prediction_cmov on any cpu with cmov

Conflicts:
	libavcodec/x86/dsputil_mmx.c
	libavformat/mp3enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-08 12:53:44 +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