Commit Graph

8305 Commits

Author SHA1 Message Date
Anton Khirnov e39400c3a8 electronicarts: parse the framerate for cmv video. 2012-03-02 11:11:38 +01:00
Anton Khirnov 1bb3990b56 ogg: don't set codec timebase
Demuxers are not supposed to set it.
2012-03-02 11:11:38 +01:00
Anton Khirnov 1d3144c318 electronicarts: don't set codec timebase
Demuxers are not supposed to set it.
Set stream timebase and framerates instead (this is a cfr container with
no timestamps).
2012-03-02 11:11:38 +01:00
Anton Khirnov 10a6e0c346 avs: don't set codec timebase
Demuxers are not supposed to set it.
Set r_frame_rate and avg_frame_rate instead.
2012-03-02 11:11:38 +01:00
Ingo Brückl c05e2be9a2 mp3dec: Fix reading file size and frames in VBRI headers
The fields "Number of Bytes" and "Number of Frames" are mixed up. "Bytes"
come first, "Frames" behind.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-03-01 15:32:28 -08:00
Diego Biurrun 75c553eb26 rmdec: adjust printf format string specifier to fix warning
libavformat/rmdec.c:383: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘int64_t’
2012-03-01 23:11:14 +01:00
Martin Storsjö 984b914c55 rtpenc: Use MB info side data for splitting H263 packets for RFC 2190
This makes the packetization spec compliant for cases where one single
GOB doesn't fit into an RTP packet.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-01 16:08:32 +02:00
Justin Ruggles 929dd8c108 dxa: set audio stream time base using the sample rate 2012-02-29 15:45:50 -05:00
Justin Ruggles aa831c4093 psx-str: do not allow seeking by bytes 2012-02-29 15:45:50 -05:00
Justin Ruggles bdbf1fa405 asfdec: Do not set AVCodecContext.frame_size 2012-02-29 15:45:50 -05:00
Justin Ruggles 4bf6775e9d vqf: set packet parameters after av_new_packet()
Otherwise the values are overwritten.
2012-02-29 15:45:50 -05:00
Martin Storsjö 07ec1f2140 rtpenc: Fix setting the max packet size
This fixes cases where the user had specified one desired MTU
via an option, and the protocol indicates another one.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-29 16:48:01 +02:00
Anton Khirnov 322537478b Add a minor bump, changelog/APIchanges entry and some documentation for APIC support. 2012-02-29 14:44:22 +01:00
Anton Khirnov 2dfea12058 mp3enc: write attached pictures (APIC). 2012-02-29 14:37:00 +01:00
Anton Khirnov c68148b1ea mp3enc: move mp3_write_xing() further up in the file.
It will be need by new functions called from mp3_write_trailer().
2012-02-29 14:36:45 +01:00
Anton Khirnov ba445f5557 id3v2enc: add a function for writing attached pictures.
Unused so far.
2012-02-29 14:31:17 +01:00
Anton Khirnov 24fe1a3b16 id3v2enc: fix writing frame sizes for ID3v2.3
Frame sizes in ID3v2.3 are not synchsafe, they are simply 32be numbers.

In practice this bug is not noticeable unless the frame size takes more
than 7 bits (which is almost never for text frames).
2012-02-29 14:30:14 +01:00
Anton Khirnov 411225aabc id3v2enc: split ff_id3v2_write().
This will allow writing the tag in several steps, needed for writing
attached pictures.
2012-02-29 14:26:14 +01:00
Anton Khirnov c199817748 id3v2enc: make id3v2_put_size take only an AVIOContext.
It has no need of full AVFormatContext.
2012-02-29 14:25:33 +01:00
Anton Khirnov 393fd0d89e id3v2: remove unused ff_id3v2_read().
Rename ff_id3v2_read_all to ff_id3v2_read().
2012-02-29 14:19:42 +01:00
Anton Khirnov 079ea6ca5f lavf: export id3v2 attached pictures as streams. 2012-02-29 14:16:32 +01:00
Anton Khirnov dd2a4bcfd7 lavf: generic code for exporting attached pictures. 2012-02-29 14:16:25 +01:00
Anton Khirnov a93b09cb45 id3v2: read attached pictures and export them in ID3v2ExtraMeta. 2012-02-29 14:14:48 +01:00
Anton Khirnov b73ad74660 lavf: move CodecMime from matroska.h to internal.h
it will be useful for attached pictures in ID3v2
2012-02-29 13:57:59 +01:00
Anton Khirnov eaea76d72c swfdec: do not set codec timebase.
It is not supposed to be set outside of lavc.

Fixes a divide by zero when the stored framerate is 0.
2012-02-29 13:52:55 +01:00
Anton Khirnov 4f07f8196c lavc: deprecate AVCodecContext.color_table_id.
It's currently only used as temporary storage by the mov demuxer. Make
it use a local variable instead.
2012-02-29 07:25:00 +01:00
Anton Khirnov 63efd83ae1 mpegvideo_enc: add chroma/luma_elim_threshold private options.
Deprecate corresponding AVCodecContext fields.
2012-02-29 07:23:31 +01:00
Ronald S. Bultje bb6d5411e1 asf: don't seek back on EOF.
Seeking back on EOF will reset the EOF flag, causing us to re-enter
the loop to find the next marker in the ASF file, thus potentially
causing an infinite loop.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-28 16:25:05 -08:00
Ronald S. Bultje 6e57a02b9f asf: error out on ridiculously large minpktsize values.
They cause various issues further down in demuxing.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-28 14:32:34 -08:00
Ronald S. Bultje 934cd18a43 oma: don't read beyond end of leaf_table.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-28 11:58:13 -08:00
Diego Biurrun cfac648e6a doxygen: Remove documentation for non-existing parameters; misc small fixes. 2012-02-28 20:48:43 +01:00
Luca Barbato 0c1759ac4b segment: implement wrap around
Provide a way to wrap around the segment index so pseudostreaming
live through a web server and html5 browser is simpler.

Also ensure that 0 (disable) is a valid value across the options
providing wrap around.
2012-02-28 15:01:20 +01:00
Luca Barbato ee42df8a35 avf: reorder AVStream and AVFormatContext 2012-02-28 15:01:20 +01:00
Michael Niedermayer e60bdb7e5c flvdec: Remove the now redundant check for known broken metadata creator
The index validation identifies these indexes as broken.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-27 12:07:24 +02:00
Martin Storsjö 7e297a46db flvdec: Validate index entries added from metadata while reading
By validating the index entries while reading, we don't need to
seek at startup to validate the entries. If the error in the
index entries is not pointing to (our definition of) the start
of packets, and there is an index entry pointing at some of the
first packets after the metadata, the invalid index can be discarded
almost immediately.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-27 12:07:24 +02:00
Tommy Winther 1a6b9a98ce rtsp: Handle requests from server to client
This returns 200 OK for OPTIONS requests and 501 Not Implemented
for all other requests.

Even though this doesn't do much actual handling of the requests,
it makes the code properly identify server requests as such, instead
of interpreting it as a reply to the client's request as it did
before.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-27 12:04:11 +02:00
Justin Ruggles f234e8a32e movenc: use timestamps instead of frame_size for samples-per-packet
For encoding, AVCodecContext.frame_size is the number of input samples to
send to the encoder and does not necessarily correspond directly to the
timestamps of the output packets.
2012-02-27 04:33:37 -05:00
Justin Ruggles f3dab5fb6d movenc: use the first cluster duration as the tfhd default duration 2012-02-27 04:33:37 -05:00
Justin Ruggles 681d17264f movenc: factorize calculation of cluster duration into a separate function 2012-02-27 04:33:37 -05:00
Anton Khirnov 7929e22bde lavf: don't guess r_frame_rate from either stream or codec timebase.
Neither of those is guaranteed to be connected to framerate in any way
(if it even exists).

Fixes bug 56.
2012-02-26 19:32:33 +01:00
Anton Khirnov d3783f47ee lavf: don't set codec timebase in avformat_find_stream_info().
It's not supposed to be set outside of lavc.
2012-02-26 07:51:12 +01:00
Anton Khirnov 87d7a92b62 rawdec: set timebase to 1/fps. 2012-02-26 07:30:21 +01:00
Ronald S. Bultje cd40c31ee9 matroska: don't overwrite string values until read/alloc was succesful.
This prevents certain tags with a default value assigned to them (as per
the EBML syntax elements) from ever being assigned a NULL value. Other
parts of the code rely on these being non-NULL (i.e. they don't check for
NULL before e.g. using the string in strcmp() or similar), and thus in
effect this prevents crashes when reading of such specific tags fails,
either because of low memory or because of targeted file corruption.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-25 07:53:23 -08:00
Anton Khirnov 655b24c01c lavf: move the packet keyframe setting code.
compute_pkt_fields() is for unreliable estimates or guessing. The
keyframe information from the parser is (at least in theory) reliable,
so it should be used even when the other guessing is disabled with the
AVFMT_FLAG_NOFILLIN flag.

Therefore, move setting the packet keyframe flag based on parser
information from compute_pkt_fields() to read_frame_internal().
2012-02-24 19:43:02 +01:00
Justin Ruggles 9677247b0a oggenc: free comment header for all codecs
fixes a memleak for Vorbis and Theora, where the comment header from
avpriv_split_xiph_headers() is replaced by a buffer that must be freed
separately.
2012-02-24 13:15:41 -05:00
Anton Khirnov 5ff42e3138 lavf/output-example: use new audio encoding API correctly. 2012-02-24 09:44:18 +01:00
Anton Khirnov 6e9ed7c7ae lavf/output-example: more proper usage of the new API.
Passing the codec into avformat_new_stream() is preferred.
2012-02-24 09:44:17 +01:00
Paul B Mahol 14c98973f5 apetag: do not leak memory if avio_read() fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-23 16:16:37 -08:00
Ronald S. Bultje 6d11057006 apetag: propagate errors.
Fixes crashes if reading the tag value fails.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-23 15:53:26 -08:00
Ronald S. Bultje 31632e73f4 swf: check return values for av_get/new_packet().
Prevents crashers when using the packet if allocation failed.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-23 12:24:58 -08:00
Martin Storsjö ba605cef79 rtpenc: Expose the max packet size via an avoption
This allows opting for a lower MTU than what the AVIOContext
indicated, and allows writing into outputs that don't indicate
an MTU at all (such as plain files, which is useful for testing).

This also allows querying for the MTU via the avoption.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23 21:32:52 +02:00
Martin Storsjö f553462041 rtpenc: Move max_packet_size to a context variable
This is in preparation for exposing this via an avoption.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23 21:32:52 +02:00
Martin Storsjö 7337484ed2 rtpenc: Add an option for not sending RTCP packets
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23 21:32:52 +02:00
Martin Storsjö ada4e362b9 rtpenc: Add an error message
Also return a proper error code.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23 16:30:09 +02:00
Martin Storsjö c4584f3c1f rtpenc: Allow packetizing H263 according to the old RFC 2190
According to newer RFCs, this packetization scheme should only
be used for interfacing with legacy systems.

Implementing this packetization mode properly requires parsing
the full H263 bitstream to find macroblock boundaries (and knowing
their macroblock and gob numbers and motion vector predictors).

This implementation tries to look for GOB headers (which
can be inserted by using -ps <small number>), but if the GOBs
aren't small enough to fit into the MTU, the packetizer blindly
splits packets at any offset and claims it to be a GOB boundary
(by using Mode A from the RFC). While not correct, this seems
to work with some receivers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23 15:27:52 +02:00
Martin Storsjö c2ff63e3ac rtpenc: Move the trailing comma into FF_RTP_FLAG_OPTS
This simplifies adding more flags to the macro.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23 15:27:42 +02:00
Justin Ruggles 3798205a77 mov: set channel layout for AC-3 streams based on the 'dac3' atom info
fixes Bug 225
2012-02-22 20:07:02 -05:00
Paul B Mahol 15b4b505c2 img2: split muxer and demuxer into separate files
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-22 22:04:03 +01:00
Ronald S. Bultje aac07a7a4c rm: prevent infinite loops for index parsing.
Specifically, prevent jumping back in the file for the next index, since
this can lead to infinite loops where we jump between indexes referring
to each other, and don't read indexes that don't fit in the file.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-22 12:00:23 -08:00
Alex Converse b142496c56 mov: Add more HDV and XDCAM FourCCs.
Reference: VLC
2012-02-22 11:23:43 -08:00
Anton Khirnov 0584e3ca97 lavf: don't set AVCodecContext.has_b_frames in compute_pkt_fields().
It is not supposed to be done outside lavc.

This is basically a revert of 818062f2f3.

It is unclear what issue this was supposed to fix, if it reappears again
it will have to be fixed in a more proper place.

The wtv-demux test change is because the sample starts with a B-frame.
2012-02-22 19:31:06 +01:00
Ronald S. Bultje e30b3e59a4 rmdec: when using INT4 deinterleaving, error out if sub_packet_h <= 1.
We read sub_packet_h / 2 packets per line of data (during deinterleaving),
which equals zero if sub_packet_h <= 1, thus causing us to not read any
data, leading to an infinite loop.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-22 09:17:27 -08:00
Paul B Mahol 58700edb94 cdxl: correctly synchronize video timestamps to audio
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-22 10:50:42 -05:00
Martin Storsjö 0c7b8b758a movenc: Buffer the mdat for the initial moov fragment, too
This allows writing QuickTime-compatible fragmented mp4 (with
a non-empty moov atom) to a non-seekable output.

This buffers the mdat for the initial fragment just as it does
for all normal fragments, too. Previously, the resulting
atom structure was mdat,moov, moof,mdat ..., while it now
is moov,mdat, moof,mdat.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-22 12:27:39 +02:00
Martin Storsjö b70f04c261 flvdec: Ignore the index if the ignidx flag is set
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-22 12:27:24 +02:00
Martin Storsjö 0a7ce3caa8 flvdec: Fix indentation
Also split a long line.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-22 12:27:15 +02:00
Martin Storsjö aa96d433e2 movdec: Don't parse all fragments if ignidx is set
In nonseekable files, we already stop parsing the toplevel atoms
after finding moov and one mdat. In large seekable files (or files
that are seekable, but slowly, e.g. http), reading all the fragments
at the start can take a considerable amount of time. This allows
opting out from this behaviour.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-22 10:39:15 +02:00
Martin Storsjö 383a3b64cb movdec: Restart parsing root-level atoms at the right spot
If parsing moov+mdat in a non-seekable file, we currently
abort parsing directly after parsing the header of the mdat
atom. If we want to continue parsing later (if looking to
parse later fragments), we need to skip past the content of the
mdat atom, otherwise we end up parsing the content of the mdat
atom as root level atoms.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-22 10:39:14 +02:00
Alex Converse 0ad522afb3 mov: Add support for MPEG2 HDV 720p24 (hdv4) 2012-02-21 14:20:28 -08:00
Diego Biurrun 3f486e0dae img2: Use ff_guess_image2_codec(filename) shorthand where appropriate. 2012-02-21 20:17:56 +01:00
Alex Converse b0f29db5c2 Mark mutable static data const where appropriate. 2012-02-21 09:47:07 -08:00
Aneesh Dogra 33510e86b1 gif: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-21 15:47:06 +01:00
Martin Storsjö a5c50913a8 movdec: Adjust keyframe flagging in fragmented files
For video, mark the first sample in a trun which doesn't have the
sample-is-non-sync-sample flag set as a keyframe.

In particular, the "sample does not depend on other samples" flag
isn't enough to make it a keyframe, since later frames still can
reference frames prior to that one (the flag only says that that
particular frame doesn't depend on other frames).

This fixes bug 215.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-21 14:19:20 +02:00
Justin Ruggles e9cda85351 avcodec: add duration field to AVCodecParserContext
This will allow parsers to export the duration of the current frame being
output, if known, instead of using AVCodecContext.frame_size.
2012-02-20 15:08:40 -05:00
Martin Storsjö a4f97be1a9 hls: Reset the AVIOContext when seeking
This avoids reading any old data in the AVIOContext buffer after
the seek, and indicates to the mpegts demuxer that we've seeked,
avoiding continuity check errors.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-20 11:10:02 +02:00
Panagiotis H.M. Issaris 2b3d041cdc applehttp: Do seeking within segments, too
Enhance seeking by demuxing until the requested timestamp is
reached within the segment selected by the seek code using the
playlist info.

Some mpegts streams don't have dts set for all packets though,
this seeking method doesn't work well for that case.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-19 23:03:42 +02:00
Luca Barbato 6b8b0fe2bc doxy: remove reference to removed api 2012-02-19 19:10:28 +01:00
Luca Barbato aac63cef20 examples: unbreak compilation
Update api so it will compile again.
2012-02-19 19:10:28 +01:00
Martin Storsjö 5be805d38c mov: Use defines for sample flags in fragments
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 21:13:36 +02:00
Martin Storsjö 3eec23f3cd mov: Use defines for trun flags
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 21:13:35 +02:00
Martin Storsjö 73328f24fa mov: Use defines for tfhd flags
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 21:13:33 +02:00
Ronald S. Bultje 41afac7f7a asf: prevent packet_size_left from going negative if hdrlen > pktlen.
This prevents failed assertions further down in the packet processing
where we require non-negative values for packet_size_left.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-18 09:12:32 -08:00
Martin Storsjö c7e8639c70 rtpdec: Identify incorrectly signalled H263
H263 in RTP can be packetized in two formats (RFC 2190, RFC
2429/4629). The former normally uses the static payload type 34,
while the latter normally uses dynamic payload types with the
SDP format names H263-1998 or H263-2000.

Look for packets that don't look like proper RFC 2190 packets and
switch to depacketizing them according to the new format if they
match some heuristic criteria.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 17:31:55 +02:00
Ronald S. Bultje 32a659c758 aiff: don't skip block_align==0 check on COMM-after-SSND files.
This prevents SIGFPEs when using block_align for divisions.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-17 15:59:03 -08:00
Martin Storsjö 5302633919 movenc: Write the unknown duration as 64 bit fields in ismv
This is required for the files to play back properly in
windows media player.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 00:03:32 +02:00
Martin Storsjö 99a357f4c5 movenc: Write track durations with all bits set if duration is unknown
According to 14496-12, the duration should be all 1s if
the duration is unknown. This is the case if writing a moov
atom without any samples described in it (e.g. as in ismv files).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 00:03:30 +02:00
Aneesh Dogra d7840529b6 avcodec: add a Sun Rasterfile encoder
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-17 14:28:56 -05:00
Paul B Mahol 6d10c5bfc0 cdxl: fix audio for some samples
There may be extra padding at and of chunk.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-17 14:19:35 -05:00
Paul B Mahol f02edc4c06 apetag: add proper support for binary tags
export as attachment streams

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-17 14:16:11 -05:00
Martin Storsjö 51df7b232f movenc: Don't set a default sample duration when creating ismv
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-16 17:49:07 +01:00
Martin Storsjö 298a587f44 rtp: Factorize the check for distinguishing RTCP packets from RTP
The binary doesn't change after this patch.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-16 17:45:33 +01:00
Justin Ruggles c9fdf3241a bethsoftvid: synchronize video timestamps with audio sample rate
According to unofficial documentation, the video rate is locked to the audio
sample rate. This results in proper synchronization of audio and video
timestamps from the demuxer. This only works if the first audio packet occurs
before the first video packet or the audio sample rate is the default rate of
11111 Hz, both of which are true for all samples in our archive.
2012-02-16 10:47:11 -05:00
Justin Ruggles 773ff823da bethsoftvid: add audio stream only after getting the first audio packet
This avoids initializing a stream with dummy values or when the file does not
contain audio.
Also set duration for audio packets, using the sample rate as the time base.
2012-02-16 10:47:11 -05:00
Justin Ruggles 9546f331c6 bethsoftvid: Set video packet duration instead of accumulating pts. 2012-02-16 10:47:11 -05:00
Justin Ruggles 05e4ae833c bethsoftvid: set packet key frame flag for audio and I-frame video packets.
Fixes avconv video stream copy of bethsoft video, which was skipping all
video frames unless the copyinkf option was used.
2012-02-16 10:47:11 -05:00
Justin Ruggles 17b115591f bethsoftvid: fix read_packet() return codes.
Use proper AVERROR codes, and return 0 for no error.
2012-02-16 10:47:11 -05:00
Justin Ruggles f320fb894c bethsoftvid: pass palette in side data instead of in a separate packet.
Update FATE reference to account for now non-existent palette packet.
This also fixes the FATE test if frame data is not initialized in
get_buffer(), so update comment in avconv accordingly.
2012-02-16 10:47:11 -05:00
Martin Storsjö f3a094f2da sdp: Ignore RTCP packets when autodetecting RTP streams
The rtp demuxer which listens for RTP packets and detects the
RTP payload type will currently get confused if the first packet
received is an RTCP packet. Thus ignore such packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-16 16:14:35 +01:00
Martin Storsjö 167f3b8de7 libavformat: Add an ff_ prefix to some lavf internal symbols
Prefix the functions/tables brktimegm, pcm_read_seek,
dv_offset_reset, voc_get_packet, codec_movaudio_tags,
codec_movvideo_tags.

After this, lavf has no global symbols without the proper prefix.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:17 +02:00
Martin Storsjö 735be9cdfb rtsp: Make rtsp_demuxer_class static
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:07 +02:00
Paul B Mahol dc4e57489f CDXL demuxer and decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-14 22:32:53 +01:00
Alex Converse c1df37e59b hls: Re-add legacy applehttp name to preserve interface compatibility. 2012-02-14 12:13:46 -08:00
Martin Storsjö 8c62d83fe5 hlsproto: Rename the functions and context
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14 20:05:32 +02:00
Martin Storsjö 9cb9c6c42d hlsproto: Encourage users to try the hls demuxer instead of the proto
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14 20:05:32 +02:00
Martin Storsjö 8bdab32f4e libavformat: Rename the applehttp protocol to hls
Keep the old protocol name around for backwards compatibility
until the next bump.

Deprecate the method of implicitly assuming the nested protocol.
For applehttp://server/path, it might have felt logical, but
supporting hls://server/path isn't quite as intuitive. Therefore
only support hls+http://server/path from now on.

Using this protocol at all is discouraged, since the hls demuxer
is more complete and fits into the architecture better. There
have been cases where the protocol implementation worked better
than the demuxer, but this should no longer be the case.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14 20:05:32 +02:00
Martin Storsjö 65cd7bf32f hls: Rename the functions and context
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14 20:05:32 +02:00
Martin Storsjö 2772258a98 libavformat: Rename the applehttp demuxer to hls
When this demuxer was created, there didn't seem to be any
consensus of a common short name for this protocol. Now
the consensus seems to be to call it hls.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14 20:05:31 +02:00
Martin Storsjö 08bddfcde5 rtpdec: Support H263 in RFC 2190 format
This is different from the "modern" RTP payload formats for H263
as defined by RFC 4629, 2429 and 3555. According to the newer RFCs,
this old one is to be considered deprecated and only be used for
interoperating with legacy systems.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14 20:05:31 +02:00
Martin Storsjö 4ace130ee6 movenc: Support muxing VC1
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14 16:12:18 +02:00
Diego Biurrun c3b57d6e76 librtmp: Add "lib" prefix to librtmp URLProtocol declarations.
This allows easily differentiating between both implementations within the build
system and combining the native implementation for plain RTMP with librtmp for
the RTMPE, RTMPS, RTMPT, RTMPTE protocol variants.
2012-02-14 11:37:01 +01:00
Martin Storsjö df6050188c movenc: Use defines instead of hardcoded numbers for RTCP types
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-14 12:23:07 +02:00
Paul B Mahol 1c77a5307f smjpegdec: implement seeking
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-14 10:12:44 +01:00
Matthew Szatmary 7dfe8f5557 rtpdec: Use 4 byte startcodes for H.264
If muxing into mpegts, 4 byte startcodes for the first NAL
of an access unit is required. Thus it is simplest for the
RTP depacketizer to just use 4 byte startcodes everywhere.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-13 23:05:10 +02:00
Diego Biurrun 529506b5f6 matroskadec: Mark variable as av_unused.
This avoids unused variable warnings when zlib/bzlib are not available.
2012-02-13 19:20:54 +01:00
Diego Biurrun 6df5c528ca Move some conditionally used variables into the block where they are used.
This allows dropping the av_unused argument from them.
2012-02-13 19:20:54 +01:00
Diego Biurrun 7331b6e718 Drop some completely unnecessary av_unused attributes. 2012-02-13 19:20:53 +01:00
Martin Storsjö 5d561514b7 movenc: Support muxing wmapro in ismv/isma
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-13 19:57:28 +02:00
Martin Storsjö ddf422803b mpegtsenc: Add an AVOption for forcing a new PAT/PMT/SDT to be written
When segmenting the output from the mpegts muxer, one can
now set this option when cutting to a new segment, to make sure
the next segment starts with PAT/PMT/SDT.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-13 17:31:05 +02:00
Diego Biurrun d1c4ec7f5e build: Set correct dependencies for rtmp* protocols implemented by librtmp. 2012-02-13 09:59:51 +01:00
Andrey Utkin e3cc617263 lavf: fix aspect ratio mismatch message.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-02-12 17:18:24 +01:00
Joakim Plate af701d42c3 cafdec: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:27:50 -05:00
Joakim Plate b69c2e0e6d yop: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:27:50 -05:00
Joakim Plate e54165aa39 tta: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:27:49 -05:00
Joakim Plate 066ad0926a tmv: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:27:49 -05:00
Joakim Plate c7b08bc0a7 r3d: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:27:49 -05:00
Joakim Plate 8dcd00eabd nsvdec: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:27:49 -05:00
Joakim Plate 97aa092997 mpc8: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:27:49 -05:00
Joakim Plate 9712e82a4e jvdec: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:27:49 -05:00
Joakim Plate 64476d7ee8 filmstripdec: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:27:49 -05:00
Joakim Plate d7c11b114b ffmdec: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:27:49 -05:00
Joakim Plate 8332321c57 dv: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:27:49 -05:00
Joakim Plate 3371e89640 bink: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-10 15:27:49 -05:00
Martin Storsjö ba83ac4c27 rtpenc: Write a log message if the max packet size is too small
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-10 10:48:51 +02:00
Alex Converse 8dbdc2d840 dv: Move a table used only by the demuxer out of a shared header. 2012-02-09 19:16:15 -08:00
Alex Converse 0ab3687924 dv: Fix small overread in audio frequency table.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-02-09 19:16:15 -08:00
Paul B Mahol 0f3d8baef9 WavPack demuxer: set packet duration
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-09 13:13:04 -05:00
Tomas Härdin e24167aae6 mxfdec: Ignore the last entry in Avid's index table segments
The last entry is the total size of the essence container.
Previously a TemporalOffset error would be logged, even though
segments like these are expected.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 13:26:02 +01:00
Tomas Härdin d6b81ff949 mxfdec: Sanity-check SampleRate
This avoids a SIGFPE if SampleRate is missing or set to naughty values.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 13:00:05 +01:00
Tomas Härdin c65642d351 mxfdec: Handle small EditUnitByteCount
These are common with audio atoms. Without this the demuxer would read two
bytes at a time for a mono 16-bit file.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 12:59:41 +01:00
Tomas Härdin 240ddbce56 mxfdec: Consider OPAtom files that do not have exactly one EC to be OP1a
This fixes demuxing of 2011_DCPTEST_24FPS.V.mxf.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 12:55:44 +01:00
Tomas Härdin 9123950be0 mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 12:54:14 +01:00
Tomas Härdin d00257e96a mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
This fixes SIGSEGV on files with both CBR and VBR index segments (zzuf6.mxf).

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 12:54:13 +01:00
Tomas Härdin df2a85085e mxfdec: Sanity check PreviousPartition
Without this certain files could get the demuxer stuck in a loop.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 12:54:05 +01:00
Tomas Härdin 11800c8c89 mxfdec: Never seek back in local sets and KLVs
Specially crafted files can lead the parsing code to take too long.
We fix a lot of these problems by not allowing local tags to extend
past the end of the set and not allowing other KLVs to be read past
the end of themselves.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 12:46:12 +01:00
Tomas Härdin 687e2fdebd mxfdec: Move the current_partition check inside mxf_read_header()
This fixes SIGSEGV on files where this is the case, such as zzuf4.mxf.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 12:43:47 +01:00
Tomas Härdin e352c96c17 mxfdec: Fix infinite loop in mxf_packet_timestamps()
This can happen if an index table segment has a very large IndexStartPosition.
zzuf3.mxf is an example of such a file.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 12:42:59 +01:00
Tomas Härdin 0373ec635d mxfdec: Check eof_reached in mxf_read_local_tags()
This fixes an infinite loop with zzuf2.mxf.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 12:41:50 +01:00
Tomas Härdin effe3b9575 mxfdec: Check for NULL component
This fixes a SIGSEGV with zzuf1.mxf.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 12:41:50 +01:00
Tomas Härdin 29fc8f50cd mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()
Only the OPAtom demuxing logic is guaranteed to have index tables,
meaning OP1a files that lack an index would cause SIGSEGV.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 12:41:42 +01:00
Tomas Härdin a3923482f2 mxfdec: Make sure x < index_table->nb_ptses
Avoids a SIGSEGV on files with IndexEntryCount < IndexDuration.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-09 12:40:34 +01:00