Commit Graph

9118 Commits

Author SHA1 Message Date
Luca Barbato 5fbceb2c63 hls: add start_number option 2012-12-08 17:04:22 +01:00
Paul B Mahol 57231e4d5b tak: demuxer, parser, and decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-12-07 16:15:02 -05:00
Michael Niedermayer 41540b36a1 bitstream: add get_bits64() to support reading more than 32 bits at once
Also remove a duplicate function in the MPEG-TS demuxer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-12-07 16:15:02 -05:00
Janne Grunau 8cc2fa1e5d mov: validate number of DataReferenceBox entries against box size
Avoids a 2G memory allocation and parsing of random data in
mov_read_dref(). The fuzzed sample sample.mp4_s224424 triggers this.
2012-12-07 11:43:28 +01:00
Janne Grunau 80b6b31417 mov: compute avg_frame_rate only if duration is known
Fixes an assert in fuzzed sample sample.mp4_s265930.
2012-12-07 11:43:28 +01:00
Janne Grunau 54c7fe6d68 raw demuxer: initialize end of partial packets 2012-12-05 00:02:43 +01:00
Anton Khirnov cb45553f57 Remove pointless #undefs of previously forbidden functions. 2012-12-04 21:40:22 +01:00
Diego Biurrun 62641dce71 build: cosmetics: Move CONFIG_RTPDEC entry to a more suitable place 2012-12-03 19:32:03 +01:00
Diego Biurrun 31f16dc1a1 build: Make the ISMV muxer select the MOV muxer
They share the same code, so building one w/o the other makes no sense.
2012-12-03 01:20:10 +01:00
Diego Biurrun cc7d5cfeec img2: K&R formatting cosmetics
Also introduce local img_ namespace to simplify debugging.
2012-11-29 17:15:57 +01:00
Diego Biurrun 2c4593dd13 rtpenc_chain: Remove unused variable 2012-11-28 18:17:49 +01:00
Justin Ruggles ab87d9b667 nuv: check for malloc failure when allocating extradata
Also make sure extradata is freed in the case where multiple
NUV_EXTRADATA frame types are found. This may not happen in practice,
but it could happen in a malformed stream, which would lead to a memleak
if not handled.
2012-11-28 11:18:50 -05:00
Justin Ruggles 838ed296df nuv: use the stream indices generated by avformat_new_stream() 2012-11-28 11:18:50 -05:00
Justin Ruggles c74f81786d nuv: cosmetics: pretty-printing 2012-11-28 11:18:50 -05:00
Justin Ruggles 5c7bf2ddde lavf: move nuv fourcc audio tags from riff to nuv 2012-11-28 11:18:50 -05:00
Justin Ruggles 261e9348ef lavf: add a common function for selecting a pcm codec from parameters 2012-11-28 11:18:50 -05:00
Justin Ruggles bfe5454cd2 lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.h 2012-11-28 11:18:49 -05:00
Justin Ruggles cdaa1f84fb lavf: move "MP3 " fourcc from riff to nut
Original commit, 7b24f9b, says it was added because it is used in libnut.
2012-11-28 11:18:49 -05:00
Michael Niedermayer 2fe0094e0b wavenc: write fact chunk sample count at the correct file position
Fixes curruption of metadata in the INFO chunk.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-11-26 19:11:10 -05:00
Justin Ruggles 259d8c5647 riff: do not add empty metadata tags in INFO chunk 2012-11-26 19:08:51 -05:00
Justin Ruggles 3c370f5abc riff: only warn on a bad INFO chunk code size instead of failing
fixes Bug 392
2012-11-26 19:08:51 -05:00
Janne Grunau 7709ce029a lavf: avoid integer overflow in ff_compute_frame_duration()
Scaling the denominator instead of the numerator if it is too large
loses precision. Fixes an assert caused by a negative frame duration in
the fuzzed sample nasa-8s2.ts_s202310.

CC: libav-stable@libav.org
2012-11-26 10:26:08 +01:00
Paul B Mahol b491da18d1 yop: fix typo
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-11-25 11:10:52 -05:00
Diego Biurrun ddb009425c riff: Make ff_riff_tags static and move under appropriate #ifdef
The table is not used outside the file.
2012-11-25 13:32:10 +01:00
Anton Khirnov 9ae80e6a9c id3v2: fix reading unsynchronized frames.
Current code would incorrectly process e.g. 'ff 00 ff 00 ff' to
'ff ff ff', while it should be 'ff ff 00 ff'.

Fixes Bug 395.

CC: libav-stable@libav.org
2012-11-22 13:40:04 +01:00
Xi Wang b655cfefaf apetag: fix error handling in ff_ape_parse_tag()
The following error handling is broken due to signedness.

    int file_size;
    uint32_t tag_bytes;
    int64_t tag_start;
    ...
    tag_start = file_size - tag_bytes - APE_TAG_FOOTER_BYTES;
    if (tag_start < 0) { ... }

Note that tag_bytes is unsigned, which makes the right-hand side of
`tag_start = ...' unsigned, too.  The 32-bit unsigned value is then
zero-extended to 64 bits.  Therefore, tag_start must be non-negative,
and the check (tag_start < 0) is always false, which breaks the error
handling.  This patch fixes the check.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-11-21 14:35:26 +01:00
Janne Grunau c84cce5a99 mxfdec: fix typo in mxf_read_seek()
Check the number of index tables before using byte offset based seeking
instead of the index_tables pointer.

Found by Måns Rullgård <mans@mansr.com>.
2012-11-15 17:37:09 +01:00
Luca Barbato 8034130e06 rtp: set the payload type as stream id
Support multiple video/audio streams with different format in the
same session.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-11-14 20:38:51 +01:00
Luca Barbato 3b4296f414 avformat: clarify stream id for muxing 2012-11-14 20:38:51 +01:00
Xi Wang e8769b37fe segment: fix NULL pointer dereference in seg_write_header()
Since the pointer `oc' is NULL, oc->oformat->name will cause a null
pointer dereference.  This patch changes it to seg->oformat->name.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-14 12:33:27 +02:00
Luca Barbato 22a0827dff hlsenc: stand alone hls segmenter
Simplifies usage but has higher latency.
2012-11-13 01:37:05 +01:00
Justin Ruggles b9629acb6b yop: set channel layout 2012-11-12 10:33:23 -05:00
Justin Ruggles 935fbb66ef wtv: set channel layout for mpeg audio 2012-11-12 10:33:23 -05:00
Justin Ruggles 7b48d93e8a westwood_aud: set channel layout 2012-11-12 10:33:22 -05:00
Justin Ruggles 2ce7f820d4 wc3movie: set channel layout 2012-11-12 10:33:22 -05:00
Justin Ruggles a94b0267f2 tmv: set channel layout 2012-11-12 10:33:22 -05:00
Justin Ruggles 7f348bd764 tiertexseq: set channel layout 2012-11-12 10:33:22 -05:00
Justin Ruggles a3949fe11f swfdec: set channel layout 2012-11-12 10:33:22 -05:00
Justin Ruggles 1c7587728c sol: set channel layout 2012-11-12 10:33:22 -05:00
Justin Ruggles bfccd76adb smacker: set channel layout 2012-11-12 10:33:22 -05:00
Justin Ruggles 57e590e4b8 siff: set channel layout 2012-11-12 10:33:22 -05:00
Justin Ruggles a634896cf8 sierravmd: set channel layout 2012-11-12 10:33:21 -05:00
Justin Ruggles c1ac602d53 rtpdec_amr: set channel layout 2012-11-12 10:33:21 -05:00
Justin Ruggles ce842029ce rsodec: set channel layout 2012-11-12 10:33:21 -05:00
Justin Ruggles 60a585304c rmdec: set channel layout for RA version 3 2012-11-12 10:33:21 -05:00
Justin Ruggles 444b79c18a qcp: set channel layout 2012-11-12 10:33:21 -05:00
Justin Ruggles b5e3e77711 psxstr: set channel layout 2012-11-12 10:33:21 -05:00
Justin Ruggles c9759eb426 omadec: set channel layout 2012-11-12 10:33:21 -05:00
Justin Ruggles d4088efbe2 oggparsespeex: validate channel count and set channel layout 2012-11-12 10:33:20 -05:00
Justin Ruggles 232e9c4c4b nuv: set channel layout 2012-11-12 10:33:20 -05:00
Justin Ruggles cc57228e31 mxg: set channel layout 2012-11-12 10:33:20 -05:00
Justin Ruggles 66d7ceb4aa mvi: set channel layout 2012-11-12 10:33:20 -05:00
Justin Ruggles f6c6e5aac1 mpc7: set channel layout 2012-11-12 10:33:20 -05:00
Justin Ruggles f24b0b1b6c mmf: set channel layout 2012-11-12 10:33:20 -05:00
Justin Ruggles 87199d34db mm: set channel layout 2012-11-12 10:33:20 -05:00
Justin Ruggles ef1b23ad21 jvdec: set channel layout 2012-11-12 10:33:20 -05:00
Justin Ruggles 4371131283 iss: set channel layout 2012-11-12 10:33:20 -05:00
Justin Ruggles 41a2d9590d ipmovie: set channel layout 2012-11-12 10:33:19 -05:00
Justin Ruggles 024e03701c iff: set channel layout 2012-11-12 10:33:19 -05:00
Justin Ruggles 73e2007f3d idroqdec: set channel layout 2012-11-12 10:33:19 -05:00
Justin Ruggles f6c3adde41 gxfdec: set channel layout when applicable 2012-11-12 10:33:19 -05:00
Justin Ruggles d4a105ae5c gsmdec: set channel layout 2012-11-12 10:33:19 -05:00
Justin Ruggles 644d8d2e5a flvdec: set channel layout 2012-11-12 10:33:19 -05:00
Justin Ruggles d5ca70b103 dv: set channel layout 2012-11-12 10:33:19 -05:00
Justin Ruggles 49e7af06f2 dsicin: set channel layout 2012-11-12 10:33:19 -05:00
Justin Ruggles a05a63785c daud: set channel layout
Update FATE reference due to WAVE channel mask now being set correctly.
2012-11-12 10:33:18 -05:00
Justin Ruggles 0d09a5848f cdxl: set channel layout 2012-11-12 10:33:18 -05:00
Justin Ruggles e8088d6e4b bmv: set channel layout 2012-11-12 10:33:18 -05:00
Justin Ruggles 2fe804f316 bink: set channel layout 2012-11-12 10:33:18 -05:00
Justin Ruggles ff50d27a63 bfi: set channel layout 2012-11-12 10:33:18 -05:00
Justin Ruggles b5d1a15d1b bethsoftvid: set channel layout 2012-11-12 10:33:18 -05:00
Justin Ruggles 39f0e9b8c6 apc: set channel layout 2012-11-12 10:33:18 -05:00
Justin Ruggles 5595368bcc amr: set channel_layout 2012-11-12 10:33:18 -05:00
Justin Ruggles a903f8f087 Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
Also reorder some other #include when applicable.
2012-11-11 13:35:12 -05:00
Luca Abeni e004d175fe rtpenc_aac: Fix calculation of the header size
Previously the high end byte was always set to zero. Also get
rid of an unnecessary multiplication (which in practice couldn't
overflow) before shifting.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-08 19:48:32 +02:00
Diego Biurrun 92fec47d69 build: The A64 muxer depends on rawenc.o for ff_raw_write_packet() 2012-11-05 20:48:50 +01:00
Martin Storsjö d578f94746 rtmp: Use av_strlcat instead of strncat
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-05 15:37:09 +02:00
Anton Khirnov 34871beb5e matroskadec: do not use avpacket internals 2012-11-02 18:28:56 +01:00
Anton Khirnov 9221efef79 lavf: fix av_interleaved_write_frame() doxy.
A sentence was mistakenly inserted in the middle of another sentence.
2012-11-02 18:28:56 +01:00
Anton Khirnov 717a450993 lavf: clarify the lifetime of demuxed packets. 2012-11-02 18:28:56 +01:00
Martin Storsjö 2b831a59d9 rtpdec_vp8: Don't parse fields that aren't used
This avoids warnings about unused variables.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-11-02 10:59:17 +02:00
Anton Khirnov fdc8672886 audiointerleave: deobfuscate a function call.
right above there is if (pkt) {<do stuff>; pkt = NULL}, so pkt is just a
fancy name for NULL at this point.
2012-11-02 07:58:38 +01:00
Anton Khirnov 179a5c37e0 rtpdec: factorize identical code used in several handlers 2012-11-02 07:58:37 +01:00
Anton Khirnov f70381ab9d a64: remove interleaved mode.
It has been disabled since it was added two years ago.
2012-11-02 07:58:37 +01:00
Luca Barbato 7658295ba3 pixfmt: support more yuva formats
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-30 12:02:42 +01:00
Anton Khirnov ede4cedf47 dv: fix indentation 2012-10-29 21:35:09 +01:00
Anton Khirnov 14f031d7ec dv: use AVStream.index instead of abusing AVStream.id 2012-10-29 21:34:05 +01:00
Martin Storsjö f21d5c905d rtsp: Avoid a cast when calling strtol
This gets rid of this warning:

libavformat/rtsp.c: In function ‘rtsp_parse_transport’:
libavformat/rtsp.c:794: warning: cast discards qualifiers from pointer target type

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-29 17:47:25 +02:00
Luca Barbato d4bff9f1ab nut: support textual data
Plain text (utf8 encoded) data can be muxed and demuxed in nut.
2012-10-29 12:03:28 +01:00
Luca Barbato 07585ffa62 nutenc: verbosely report unsupported negative pts
Additionally use the correct error number.
2012-10-29 10:52:13 +01:00
Martin Storsjö 48f01398ba rtpdec: Cosmetic cleanup
Mainly clean up the RTP statistics code, plus a few other obviously
misindentend lines.

Remove some useless comments, de-doxygenize some comments,
add spacing around operators and fix a typo.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-28 20:50:01 +02:00
Luca Barbato 424b1e7642 yuv4mpeg: reject unsupported codecs
The muxer already rejects unsupported pixel formats, reject also
unsupported codecs to prevent dangerous misuses.
2012-10-28 05:07:55 +01:00
Luca Barbato fce4450dec nutenc: K&R formatting cosmetics 2012-10-28 05:07:55 +01:00
Mans Rullgard 4cbae57cef assdec: fix qsort() callback signature
This changes the event_cmp() function to the correct signature,
avoiding an ugly cast.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 18:26:28 +01:00
Mans Rullgard 4521645b1a avio: fix pointer type mismatches in avio_enum_protocols()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 13:43:44 +01:00
Mans Rullgard be2efe0c7b udp: use socklen_t where appropriate
getsockname() takes a pointer to socklen_t which is not necessarily
int.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 13:11:46 +01:00
Mans Rullgard 9efbfe57e0 network: use HAVE_THREADS instead of local hack
HAVE_THREADS is set in config.h if pthreads or w32threads is
available, which presumably the proper condition here.

Also fixes undefined behaviour in preprocessor directives.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 13:11:17 +01:00
Luca Barbato 254056c4ab pcm: change references to raw to pcm 2012-10-25 17:08:58 +02:00
Janne Grunau dcdfb8ede3 pcmdec: change default of channels parameter to 1
This was previously implicitly done in ff_raw_read_header().
Fixes fate tests with pcm input.
2012-10-25 15:14:40 +02:00
Luca Barbato 587874ef1c rawdec: remove ff_raw_read_header
It is not used anymore and is a kludge.
2012-10-25 14:05:13 +02:00
Luca Barbato 2ef4d586d6 pcmdec: remove dependency from rawdec
The code shared is not actually shared with anything else.
2012-10-25 14:05:13 +02:00
Luca Barbato 5f0e161dd6 g722: refactor out of rawdec.c 2012-10-25 14:05:05 +02:00
Luca Barbato 42c26a4864 rawvideo: use a specific read_header
ff_raw_read_header is used only for this demuxer for video.
2012-10-25 14:04:18 +02:00
Diego Biurrun 2a91ada828 avutil: Make LZO decoder code configure-time selectable 2012-10-25 11:49:49 +02:00
Martin Storsjö c44cef978b smoothstreamingenc: Don't assume streams start from timestamp 0
Also use dts instead of pts for deciding where to split fragments.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-24 14:46:08 +03:00
Anton Khirnov 292a08cbab asfdec: cosmetics, reformat ff_asf_parse_packet() 2012-10-24 08:46:45 +02:00
Diego Biurrun c2dac8ac7a rtmppkt: Avoid unescaped backslash in Doxygen comment 2012-10-23 13:36:58 +02:00
Mans Rullgard 4ebc6a7410 build: Plan 9 support
This adds support for building on Plan 9 x86-32.  The compat/plan9
directory contains these items:

- replacements for the 'head' and 'printf' shell commands
- wrapper for main() to disable FPU exceptions

Larger required changes to the system are described in the
documentation.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 12:01:18 +01:00
Mans Rullgard c3e73100af network: use getservbyport() only if available
The absence of this function will only give a less informative
string back from our fallback implementation of getnameinfo().

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 12:00:21 +01:00
Mans Rullgard da0d0ae9a4 network: add fallbacks for INADDR_LOOPBACK and INET_ADDRSTRLEN
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 12:00:21 +01:00
Diego Biurrun 8f4c414df6 Improve wording and spelling of av_log_missing_feature messages. 2012-10-23 10:28:40 +02:00
Anton Khirnov 6173a8fe5d riff: remove a write-only variable 2012-10-22 08:49:58 +02:00
Martin Storsjö c3e15f7b39 rtpdec: Don't pass a non-AVClass pointer as log context
The log context is assumed to start with an AVClass pointer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-22 01:46:33 +03:00
Martin Storsjö e0d5ac6ae3 rtsp: Update a comment to the current filename scheme
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-22 01:46:10 +03:00
Martin Storsjö 2f41eaa9c6 rtsp: Make sure the ret variable is initialized in ff_rtsp_fetch_packet
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-20 01:59:06 +03:00
Martin Storsjö 3f055f8f5f rtsp: Allow setting the reordering buffer size via an AVOption
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-18 23:10:48 +03:00
Martin Storsjö 1c37744963 rtsp: Vertically align a constant definition
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-18 23:10:42 +03:00
Martin Storsjö 0de9380be5 rtp: Update the check for distinguishing between RTP and RTCP
Also add enums for more RTCP packet types, according to the IANA
list of registered types.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-18 23:10:20 +03:00
Diego Biurrun 7b2121e7e2 riff: Move functions around to be covered by appropriate #ifdefs
This fixes compilation with --disable-muxers.
2012-10-18 16:12:45 +02:00
Martin Storsjö 0af1fe845a avformat: Fix references to the removed function av_write_header in comments
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-18 16:33:48 +03:00
Martin Storsjö fc085c5b33 gxf: Add a local copy of the relevant parts of the frame rate table
This avoids having to share this table across the library
boundaries.

This shared table used to be problematic, if always declaring
all exported data symbols with the dllimport attribute (even
while building that same library), since it needs to be a
link-time constant when it is used in AVCodec declarations
(in mpeg12enc.c).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-18 14:26:13 +03:00
Martin Storsjö b760ffdd07 aviobuf: Remove a senseless ifdef in avio_seek
This seemed to assume that one never used writing avio unless
muxers or networking was enabled.

This ifdef is a remnant since 8fa641f8.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-18 01:44:05 +03:00
Anton Khirnov a43283b6f4 wavdec: check size before reading the data, not after. 2012-10-16 18:52:21 +02:00
Anton Khirnov 79922d7237 wav: do not fail on empty INFO tags
Fixes Bug 379

CC: libav-stable@libav.org
2012-10-16 18:52:14 +02:00
Anton Khirnov 31c54711cc lavf: split wav muxer and demuxer into separate files. 2012-10-16 18:52:07 +02:00
Victor Vasiliev 58b619c8a2 wav muxer: write metadata
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-10-16 18:51:56 +02:00
Victor Vasiliev 0bca0283cc riff: do not write empty INFO tags
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-10-16 18:51:16 +02:00
Victor Vasiliev 71e92414bf lavf: move RIFF INFO tag writing from avienc to riff
It will be useful in the wav muxer.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-10-16 18:50:36 +02:00
Mans Rullgard 1fbaabefc4 network: #include stdint.h in network.h
This header uses various types provided by stdint.h without
explicitly including it.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-16 14:45:29 +01:00
Luca Barbato 21de6ba5c1 nut: export codec_tag provided by rawvideo
Raw audio does not provide valid audio tags while rawvideo does.
The fate refs have to be updated because it undoes the previous tag
change.
2012-10-16 15:26:31 +02:00
Mans Rullgard 3b20eb25e7 avserver: move avserver-specific code from ffmdec.c to avserver.c
This way avserver only depends on the data structures of the ffm
demuxer, which it already does, and not also on private functions
being exported by the library.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-16 14:20:05 +01:00
Diego Biurrun 7e68c91e24 rmdec: Move SIPR code shared with Matroska demuxer to a separate file 2012-10-15 13:34:07 +02:00
Luca Barbato 92281850a2 nut: support pcm codecs not mapped in avi
The native tags will be used when available.
2012-10-13 12:33:18 +02:00
Luca Barbato 1bd442c276 nut: prioritize native tags
Use native tags instead of avi ones, simplifies a lot raw video codecs
handling.
2012-10-13 12:33:18 +02:00
Mans Rullgard 0a7005bebd rtpdec_xiph: fix function return type
parse_packed_headers() returns either zero or a negative error code
so its return type must be signed.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-12 22:21:10 +01:00
Mans Rullgard 366484fff1 smjpeg: fix type of 'ret' variable in smjpeg_read_packet()
The 'ret' variable is used for negative error codes so it should
be a signed type.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-12 22:21:10 +01:00
Diego Biurrun 717addecad Use proper return values in case of missing features 2012-10-12 20:56:54 +02:00
Diego Biurrun 930c9d4373 avutil: Duplicate ff_log2_tab instead of sharing it across libs
The table is so small that the space gain is not worth the
performance overhead of cross-library access.
2012-10-12 20:39:17 +02:00
Martin Storsjö 5a2cb78219 rtspdec: Set the default port for listen mode, if none is specified
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-12 18:17:24 +03:00
Michael Niedermayer 2f1b2ff934 rtmpproto: Fix an out of array write
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-12 18:16:59 +03:00
Michael Niedermayer eae35eadc0 rtspdec: Fix use of uninitialized byte
ffurl_read_complete can return 0 as well as negative error codes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-12 18:16:57 +03:00
Martin Storsjö da18e918a4 md5: Allocate a normal private context for the opaque md5 context pointer
This avoids having to overestimate the md5 context size, which
isn't known beforehand, allowing us to use the new allocate functions
instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-11 23:35:29 +03:00
Martin Storsjö e002e3291e Use the new aes/md5/sha/tree allocation functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-11 23:35:28 +03:00
Janne Grunau bd141f5ec9 mxfdec: return error if no segments are available in mxf_get_sorted_table_segments
Fixes CID732275.
2012-10-10 21:24:32 +02:00
Luca Barbato 26db9100b2 segment: support applehttp style list 2012-10-10 18:56:55 +02:00
Luca Barbato b522000e9b avio: introduce avio_closep 2012-10-10 18:56:55 +02:00
Luca Barbato 82569b01a1 mpegtsenc: set muxing type notification to verbose 2012-10-10 18:56:54 +02:00
Janne Grunau d5ef9354ce rtspdec: use av_strlcpy for writing into fixed size buffer
Fixes CID231347.
2012-10-09 21:05:15 +02:00
Janne Grunau 4a7c0c4555 http: use av_strlcpy instead of strcpy() without size checks
Fixes CID700730.
2012-10-09 21:05:14 +02:00
Janne Grunau 4ffbe3f3a5 matroskaenc: check cue point validity before reallocation
Prevents memory leak and possible access to freed memory.
Fixes CID605744.
2012-10-09 15:39:05 +02:00
Janne Grunau 53e122dd4a swfenc: error out for more than 1 audio or video stream
Prevents CID602000.
2012-10-09 15:39:05 +02:00
Janne Grunau 8dd0650fe6 rtpdec_mpeg4: au_headers is a single array, simple av_free is enough
Fixes CID700204.
2012-10-09 14:24:36 +02:00
Martin Storsjö 7bc433b36d fate: Add tests of the ff_make_absolute_url function
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-09 14:16:34 +03: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
Diego Biurrun f75f4194d1 Restructure av_log_missing_feature message
Some invocations include a verb in the log message, others do not.  Yet
av_log_missing_feature expects callers to provide a verb.  Change the
function to include a verb instead and update the callers accordingly.
The result is a more natural function API and correct English in the
function invocations.
2012-10-09 11:39:26 +02:00
Martin Storsjö c136a813d7 rtp: Support packetization/depacketization of opus
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-09 11:57:11 +03:00
Yusuke Nakamura e04826c34e file: Set the return value type for lseek to int64_t.
This fixes a regression in 4ed5ac5.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-09 11:27:12 +03:00
Martin Storsjö c9b10cc4db rtpenc_vp8: Update the packetizer to the latest spec version
Tested to work with the gstreamer depacketizer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-08 23:55:53 +03:00
Martin Storsjö 66d652cbf3 rtpdec_vp8: Make the depacketizer implement the latest spec draft
Not all details are implemented, but it's enough for proper
playback as long as there is no packet loss.

Tested to work with the packetizer in gstreamer (which although
uses a different codec name, to clarify that it is still a spec
draft).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-08 23:55:52 +03:00
Luca Barbato 0826d8513d segment: drop global headers setting
avconv provides an option to set it externally and there isn't a way for
the outer demuxer to report the inner demuxer flag.

Solves a bad interaction between mpegts and x264, but requires
additional setting for the user.
2012-10-08 11:22:42 +02:00
Anton Khirnov 716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Martin Storsjö e67b0f9952 gxf: Include the right header for the avpriv_frame_rate_tab declaration
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-07 14:14:37 +03:00
Justin Ruggles 11dcddb97b ffm: do not write or read the audio sample format 2012-10-06 12:21:54 -04:00
Martin Storsjö cde26748ae smoothstreamingenc: Add a more verbose error message
This helps tracking down the cause if this happens to be an issue.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-06 13:05:35 +03:00
Martin Storsjö fadd3a6821 smoothstreamingenc: Ignore the return value from mkdir
We don't need to return an error if the directory already existed.
We make sure that the directory actually is properly writeable later
within ism_write_header by writing a manifest anyway.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-06 13:05:34 +03:00
Martin Storsjö 8e2763786d smoothstreamingenc: Try writing a manifest when opening the muxer
This allows failing cleaner and earlier if unable to write to
the output directory.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-06 13:05:33 +03:00
Martin Storsjö 3ea06ac59e smoothstreamingenc: Move the output_chunk_list and write_manifest functions up
This allows calling write_manifest from ism_write_header without
a forward declaration.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-06 13:05:32 +03:00
Martin Storsjö 5fa43f76aa smoothstreamingenc: Properly return errors from ism_flush to the caller
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-06 13:05:31 +03:00
Martin Storsjö eb2f391018 smoothstreamingenc: Check the output UrlContext before accessing it
This code can be called with a NULL UrlContext if writing of the
trailer involves seeking.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-06 13:05:30 +03:00
Anton Khirnov d3a72becc6 yuv4mpeg: return proper error codes.
Fixes Bug 373.

CC:libav-stable@libav.org
2012-10-06 10:42:39 +02:00
Diego Biurrun e4cbf7529b Give all anonymously typedeffed structs in headers a name
Anonymous structs cannot be forward declared and have no benefit.
2012-10-06 09:27:11 +02:00
Martin Storsjö 91c1567beb segment: Add comments about calls that only are relevant for some muxers
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-04 18:22:47 +03:00
Martin Storsjö c864c3968a segment: Add an option for omitting the first header and final trailer
This allows writing totally bare segments, without any header/trailer
included anywhere.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-04 13:52:09 +03:00
Martin Storsjö a854362b40 segment: Flush buffered data before finishing a segment
This makes sure any buffered data is written to the segment, for
muxers that buffer up data internally (e.g. fragmented mp4).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-04 13:52:09 +03:00
Martin Storsjö f7b240434c segment: Set the resend_headers flag for each segment
This makes sure new inline headers are emitted when the next
packet is written. This allows segmenting mpegts without calling
write_header/write_trailer (nor freeing/reiniting the muxer)
for each segment.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-04 13:52:09 +03:00
Martin Storsjö 378a6315b7 segment: Add an option for disabling writing of a header/trailer to each segment
Some segmented formats (such as fragmented mp4) are "bare", as in,
the segment files do not have the same headers/trailers as full normal
files of that format have.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-04 13:52:09 +03:00
Martin Storsjö eb447d5159 segment: Free and reinit the muxer before calling avformat_write_header
This makes sure the muxers are set up in the way they expect
with no data left around from the previous run (which could
cause various issues including memory leaks, depending on the chaine
muxer).

This fixes memory leaks with the mpegts and flv muxers. It also
makes the usage of chained muxers correct.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-04 13:52:09 +03:00
Martin Storsjö 73871dc96f segment: Use the public av_write_header/av_write_trailer functions
With this change, the segmenter muxer doesn't rely on anything
not available/supported to libavformat external users, making
the segmenter muxer do things just like a normal segmenter
application using libavformat would do.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-04 13:52:09 +03:00
Martin Storsjö 0edae4e628 segment: Properly create new AVStreams for the chained muxer
Before, the chained muxer reused the AVStreams array from
the outer muxer, which made it impossible to use the proper
public functions (such as av_write_frame) when calling the
chained muxer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-04 13:52:09 +03:00
Martin Storsjö aa9f128b7c segment: Add a missing space
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-04 13:52:08 +03:00
Michael Niedermayer 769ed3057e h264probe: Don't error out on bits that no longer are reserved
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-04 00:59:34 +03:00
Martin Storsjö 4edb34f6cc segment: Pass the interrupt callback on to the chained AVFormatContext, too
This might not be needed at the moment, but it's good practice to
pass it to all chained AVFormatContexts, if it would happen to be
used there at a later point.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-02 22:14:07 +02:00
Luca Barbato 72d30b2792 nut: add do {} while (0) to GET_V
Make it consistent with the other function-like macros.
2012-10-02 12:16:47 +02:00
Luca Barbato 1e46c63eb7 avformat: refactor avformat_write_header
Split away option settings, sanity checks and general setup.
2012-10-01 19:57:57 +02:00
Luca Barbato 86bbdf865e avformat: refactor avformat_write_header
Mostly cosmetic changes adding some intermediate to shorten the lines.
2012-10-01 19:57:57 +02:00
Luca Barbato 55f9037f38 avformat: split muxing functions from util.c 2012-10-01 19:57:57 +02:00
Diego Biurrun 15d35bee83 mpegts: Drop pointless casting of hex_dump_debug arguments 2012-10-01 13:18:28 +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
Diego Biurrun 11d4e92ed9 avformat: Remove non-compiling and/or silly commented-out printf/av_log statements 2012-10-01 10:24:28 +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
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
Diego Biurrun bc66827fb1 nutenc: const correctness for ff_put_v_trace/put_s_trace function arguments 2012-09-27 19:32:47 +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
Diego Biurrun 93e81ee81c nutdec: const correctness for get_v_trace/get_s_trace function arguments 2012-09-26 19:10:13 +02:00