Commit Graph

8336 Commits

Author SHA1 Message Date
Luca Barbato ebbede2265 movenc: small refactor mov_write_packet
Share the formerly internal write_packet with the hinter and move the
fragment flush logic to the user facing one since it is not concerned
about movtrack-only streams.

Fixes bug #263

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-11 14:38:37 +03:00
Luca Barbato 18b59956e0 movenc: remove redundant check
The proper check is already in mov_write_header.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-11 14:38:36 +03:00
Diego Biurrun 679481b3b6 Drop some pointless #ifdefs.
The files are only compiled if the #ifdef conditions are met.
2012-04-10 19:27:38 +02:00
Asen Lekov a559d65c07 nutdec: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-04-10 14:57:47 +02:00
Martin Storsjö 9294f538e9 rtsp: Don't use av_malloc(0) if there are no streams
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-08 15:51:33 +03:00
Martin Storsjö 62c3c8ca78 rtsp: Don't use uninitialized data if there are no streams
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-08 15:51:32 +03:00
Martin Storsjö 2ce7f4d4e6 cosmetics: Fix indentation
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-08 12:04:29 +03:00
Martin Storsjö 456001486e rtsp: Don't expose the MS-RTSP RTX data stream to the caller
This avoids exposing a dummy AVStream which won't get any data
and which will make avformat_find_stream_info wait for info about
this stream.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-08 12:04:22 +03:00
Martin Storsjö d293e3464d rtpdec_asf: Set the no_resync_search option for the chained asf demuxer
Searching for packet markers doesn't make sense for this use case,
where packets are fed one at a time to the demuxer.

This fixes playing back streams that have packets not starting
with the 0x82, 0x00, 0x00 marker.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-07 01:01:08 +03:00
Martin Storsjö 75b7feaeb4 asfdec: Add an option for not searching for the packet markers
Some streams don't contain these.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-07 01:01:03 +03: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
Martin Storsjö 20234a4bd7 cosmetics: Align muxer/demuxer declarations
Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 19:19:59 +03:00
Raffaele Sena 34d908c083 rtmp: implement bandwidth notification
Improve compatibility with some servers.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-04-03 12:37:31 -07:00
Samuel Pitoiset faba4a9b88 rtmp: update supported audio codecs value
The audio codecs property is composed by all values except
SUPPORT_SND_INTEL (0x0008) and SUPPORT_SND_UNUSED (0x0010) which are
unused.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-04-03 12:24:33 -07:00
Anton Khirnov ddb4431208 id3v2: fix skipping extended header in id3v2.4
In v2.4, the length includes the length field itself.
2012-04-01 09:02:24 +02:00
Reimar Döffinger 10b1c060f9 oggenc: fix condition when not to flush due to keyframe granule.
The previous condition of 0 page size was wrong,
that would disable the mechanism for all frames at
a start of a page, thus some keyframes still would not
get their own granule.
The real problem is that header packets must not be flushed,
but they have (and must have) 0 granule and thus would
be detected as keyframes.
Add a separate parameter to mark header packets.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-30 16:32:16 -04:00
Andres Gonzalez ed3e1b485a oggenc: add pagesize option to set preferred page size
When set, if an Ogg stream buffer has enough data, a page is made
instead of filling maximum-size pages. Using smaller pages results
smaller seek intervals at the expense of higher container overhead.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-30 16:32:03 -04:00
Diego Biurrun afd8a3957b output-example: K&R formatting cosmetics, comment spelling fixes 2012-03-30 13:43:29 +02:00
Luca Barbato 93f6d0475f avf: make the example output the proper message
av_dump_format needs the codecs opened in order to print
them.
2012-03-29 17:07:19 -07:00
Luca Barbato 28db30aa29 avf: fix audio writing in the output-example
av_init_packet does not reset data and size fields in AVPacket,
avcodec_encode_audio2 can use preallocated AVPacket.
2012-03-29 17:07:19 -07:00
Ronald S. Bultje 4f7c7624c0 mov: don't overwrite existing indexes.
Prevents all kind of badness if files contain multiple
indexes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-29 11:36:14 -07:00
Kostya Shishkov f704eb612b id3v2: add another mimetype for JPEG image 2012-03-29 15:49:06 +02:00
Ronald S. Bultje 44257ef426 asf: only set index_read if the index contained entries.
This allows falling back to a binary search if the file contains no
index, thus fixing seeking in such files (e.g. luckynight.wma).
2012-03-28 10:22:25 -07: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
Justin Ruggles eed691f7d1 oggdec: calculate correct timestamps in Ogg/FLAC
We need to parse the individual packet durations when there is more than one
packet in a page.
2012-03-27 16:11:06 -04:00
Paul B Mahol 55abaa58e5 westwood_vqa: fix SND0 chunk handling
Version from vqa header does not dictate which sound chunks may
appear in file.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-27 11:58:15 -04:00
Paul B Mahol f0a343f399 westwood_vqa: set video stream duration
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-27 08:54:07 -07: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
Alex Converse c9024a9fd7 mpegts: Fix dead error checks 2012-03-26 17:53:51 -07:00
Diego Biurrun ad0e31f134 build: prettyprinting cosmetics 2012-03-26 13:00:10 +02:00
Anton Khirnov 967923abd1 lavf doxy: expand AVStream.codec doxy. 2012-03-26 10:59:43 +02:00
Anton Khirnov e44ada129c lavf doxy: improve AVStream.time_base doxy.
Remove confusing sentence that implied the user should set the timebase.
Elaborate on how the timebase is set for muxing.
2012-03-26 10:59:43 +02:00
Anton Khirnov f58b8cc3e3 lavf doxy: add some basic documentation about reading from the demuxer. 2012-03-26 10:59:43 +02:00
Anton Khirnov 10fa4ff7bc lavf doxy: document passing options to demuxers. 2012-03-26 10:59:43 +02:00
Anton Khirnov dca9c81d82 lavf doxy: clarify that an AVPacket contains encoded data. 2012-03-26 10:59:42 +02:00
Jindrich Makovicka 3fadb29baf mpegtsenc: allow user triggered PES packet flushing
Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-26 11:41:18 +03:00
Martin Storsjö 68893afe1d movenc: Merge if statements
This isn't exactly equivalent with the earlier code for codecs
other than H264 and VC1, but those are two only codecs supported
by this codepath anyway, and it simplifies it a bit.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-25 01:06:49 +02:00
Martin Storsjö d5ed5e7d0c avc: Add a function for converting mp4 style extradata to annex b
Make movenc use this function instead of the current custom
conversion function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-24 22:53:18 +02:00
Martin Storsjö e20ad71ebb libavformat: Document who sets the AVStream.id field
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-24 22:17:37 +02:00
Alex Converse 5023b89bba xwma: Validate channels and bits_per_coded_sample.
This prevents a SIGFPE later on.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 13:57:12 -07:00
Alex Converse 86f2ae06b9 mov: Do not read past the end of the ctts_data table.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 13:57:12 -07:00
Alex Converse 3e6e89b3d6 mov: Add missing terminator to mov_ch_layout_map_1ch.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: Libav-stable@libav.org
2012-03-22 13:56:44 -07:00
Ronald S. Bultje e73c6aaabf asf: reset side data elements on packet copy.
Prevents crash (double free) when free()ing the original packet.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 12:17:14 -07:00
Michael Niedermayer f0b4a505d8 oggparseogm: fix order of arguments of avpriv_set_pts_info().
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-03-22 19:51:43 +01:00
Justin Ruggles f036342b4b aiffdec: set block_duration to 1 for PCM codecs that are supported in AIFF-C 2012-03-22 11:45:46 -04:00
Justin Ruggles b38b7cc392 aiffdec: factor out handling of integer PCM for AIFF-C and plain AIFF 2012-03-22 11:45:46 -04:00
Justin Ruggles 2c07c18048 aiffdec: use av_get_audio_frame_duration() to set block_duration for AIFF-C 2012-03-22 11:45:46 -04:00
Justin Ruggles 02f88eec1d aiffdec: do not set bit rate if block duration is unknown
CC: libav-stable@libav.org
2012-03-22 11:45:36 -04: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