Commit Graph

36219 Commits

Author SHA1 Message Date
Martin Storsjö
58b5971881 rtp: Cosmetic cleanup
Remove leftover debug comments, fix brace placement and
add whitespace, remove unnecessary and weirdly placed braces.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-12 00:01:28 +02:00
Marcin Juszkiewicz
d11cb13b0e configure: enable pic for shared libs on AArch64
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-11 11:01:05 +02:00
Luca Barbato
c1d1ef4ecd zmbv: Reset the decoder on keyframe errors
Prevent the crash on fuzzed files as reported in bug 63.
2013-01-11 05:07:42 +01:00
Vladimir Pantelic
7b8c5b263b vc1dec: prevent a crash due missing pred_flag parameter
Handle pred_flag parameter not given to get_mvdata_interlaced()

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-11 04:57:41 +01:00
Dale Curtis
ae3d416369 matroska: Fix use after free
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-11 00:12:08 +01:00
Ronald Bultje
ec86ba5731 vp3: Fix double free in vp3_decode_end()
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-10 20:05:42 +01:00
Diego Biurrun
f8936c6f90 fate: Split fate-siff test into demuxer and VB video decoder test 2013-01-10 17:54:47 +01:00
Martin Storsjö
76c40fbef0 rtpdec_vp8: Don't trim too much data from broken frames
Previously, for broken frames, we only returned the first partition
of the frame (we would append all the received packets to the packet
buffer, then set pkt->size to the size of the first partition, since
the rest of the frame could have lost data inbetween) - now instead
return the full buffered data we have, but don't append anything more
to the buffer after the lost packet discontinuity. Decoding the
truncated packet should hopefully get better quality than trimming out
everything after the first partition.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-10 09:43:01 +02:00
Martin Storsjö
3b366c3aa0 rtpdec_vp8: Simplify code by using an existing helper function
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-10 09:41:44 +02:00
Martin Storsjö
ed79093222 rtpdec: Add a terminating null byte at the end of the SDES/CNAME
This is required by RFC 3550 (section 6.5):

   The list of items in each chunk MUST be terminated by one or more
   null octets, the first of which is interpreted as an item type of
   zero to denote the end of the list.

This was implicitly added as padding before, unless the host name
length matched up so no padding was added.

This makes wireshark parse the packets properly if other RTCP items
are appended to the same packet.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-10 09:40:49 +02:00
Luca Barbato
a800fd5fc7 yuv4mpeg: do not use deprecated functions
Use the libavutil replacement.
2013-01-09 21:07:49 +01:00
Luca Barbato
fba8e5b608 oggdec: fix faulty cleanup prototype 2013-01-09 21:07:48 +01:00
Justin Ruggles
06deaf8ad3 idcin: return 0 from idcin_read_packet() on success.
This matches the AVInputFormat.read_packet() API.
2013-01-09 14:49:07 -05:00
Justin Ruggles
5d0450461f idcin: better error handling
Add some additional checks for EOF and print error messages on an incomplete
header or packet.

FATE reference updated for id-cin-video due to the demuxer no longer
returning a partial video packet at EOF.
2013-01-09 14:49:07 -05:00
Justin Ruggles
33f58c3616 idcin: check for integer overflow when calling av_get_packet()
chunk_size is unsigned 32-bit, but av_get_packet() takes a signed int as the
packet size.
2013-01-09 14:49:06 -05:00
Justin Ruggles
7040e479a1 idcin: allow seeking back to the first packet
Also, do not allow seek-by-byte, as there is no way to find the next packet
boundary.
2013-01-09 14:49:06 -05:00
Justin Ruggles
49543373f3 idcin: set AV_PKT_FLAG_KEY for video packets with a palette 2013-01-09 14:49:06 -05:00
Justin Ruggles
ccc0ffb1ba idcin: set start_time and packet duration instead of manually tracking pts.
Also, use 1 / sample_rate for audio stream time_base.
2013-01-09 14:49:06 -05:00
Justin Ruggles
4b840930da idcin: set channel_layout 2013-01-09 14:49:06 -05:00
Justin Ruggles
12c2530b1d idcin: fix check for presence of an audio stream 2013-01-09 14:49:06 -05:00
Justin Ruggles
b0c96e0613 idcin: validate header parameters
Avoids using unsupported parameters and signed integer overflows.
2013-01-09 14:49:06 -05:00
Justin Ruggles
f7bf72a4a1 idcinvideo: correctly set AVFrame defaults 2013-01-09 14:49:06 -05:00
Daniel Kang
899157b308 yadif: Port inline assembly to yasm
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-09 18:41:02 +01:00
Justin Ruggles
f7a3c540c5 au: remove unnecessary casts 2013-01-09 11:52:57 -05:00
Justin Ruggles
2f8207b1c6 au: return AVERROR codes instead of -1 2013-01-09 11:52:57 -05:00
Justin Ruggles
fd9147f114 au: cosmetics: pretty-print and remove pointless comments 2013-01-09 11:52:57 -05:00
Justin Ruggles
c88d245c98 au: use ff_raw_write_packet() 2013-01-09 11:52:57 -05:00
Justin Ruggles
bdd00e2d1b au: set stream start time and packet durations 2013-01-09 11:52:57 -05:00
Justin Ruggles
af68a2baae au: use %u when printing id and channels since they are unsigned 2013-01-09 11:52:57 -05:00
Justin Ruggles
47d029a4c1 au: validate sample rate 2013-01-09 11:52:57 -05:00
Justin Ruggles
c837b38dd3 au: move skipping of unused data to before parameter validation
Also do not unnecessarily skip 0 bytes.
2013-01-09 11:52:57 -05:00
Justin Ruggles
fb48f825e3 au: do not arbitrarily limit channel count
Nothing in the AU specification sets a limit on channel count.
We only need to avoid an overflow in the packet size calculation.
2013-01-09 11:52:57 -05:00
Justin Ruggles
2613de8805 au: do not set pkt->size directly
It is already set by av_get_packet() even for partial reads.
2013-01-09 11:52:57 -05:00
Justin Ruggles
bd4cdef5a8 au: set block_align and use it in au_read_packet() 2013-01-09 11:52:56 -05:00
Justin Ruggles
9a7b56883d au: set bit rate 2013-01-09 11:52:56 -05:00
Justin Ruggles
3f98848d6e au: validate bits-per-sample separately from codec tag 2013-01-09 11:52:56 -05:00
Martin Storsjö
71194ef6a8 rtpdec_vp8: Mark broken packets with AV_PKT_FLAG_CORRUPT
This allows the caller to either include them (and get more packets
decoded, but possibly some nonperfect frames), or discard them (by
setting fflags=discardcorrupt).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-09 12:14:00 +02:00
Alexandra Khirnova
d744801f1a xan: Convert to bytestream2
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-09 09:59:55 +01:00
Justin Ruggles
59220d559b oggenc: add a page_duration option and deprecate the pagesize option
This uses page duration instead of byte size to determine when to buffer
the page. Also, it tries to avoid continued pages by buffering the current
page if there are already packets in the page and adding the next packet
would require it to be continued on a new page. This can improve seeking
performance.

The default page duration is 1 second, which is much saner than filling
all page segments by default.
2013-01-08 15:42:36 -05:00
Justin Ruggles
a6a3164b13 x86: lavr: add SSE2/AVX dither_int_to_float() 2013-01-08 14:52:43 -05:00
Justin Ruggles
1fb8f6a44f x86: lavr: add SSE2 quantize() for dithering 2013-01-08 14:52:43 -05:00
Justin Ruggles
142c39097c doc/APIchanges: fill in missing dates and hashes. 2013-01-08 14:51:30 -05:00
Martin Storsjö
6f72441120 rtpdec_vp8: Request a keyframe if RTP packets are lost
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-08 19:23:56 +02:00
Martin Storsjö
86d9181cf4 rtpdec: Support sending RTCP feedback packets
This sends NACK for missed packets and PLI (picture loss indication)
if a depacketizer indicates that it needs a new keyframe, according
to RFC 4585.

This is only enabled if the SDP indicated that feedback is supported
(via the AVPF or SAVPF profile names).

The feedback packets are throttled to a certain maximum interval
(currently 250 ms) to make sure the feedback packets don't eat up
too much bandwidth (which might be counterproductive). The RFC
specifies a more elaborate feedback packet scheduling.

The feedback packets are currently sent independently from normal
RTCP RR packets, which is not totally spec compliant, but works
fine in the environments I've tested it in. (RFC 5506 allows this,
but requires a SDP attribute for enabling it.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-08 17:48:14 +02:00
Martin Storsjö
42805eda55 rtpdec: Store the dynamic payload handler in the rtpdec context
This allows calling other dynamic payload handler functions if
needed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-08 17:47:27 +02:00
Martin Storsjö
9c80ed836a rtpdec_vp8: Avoid a warning about a possibly unused variable
The warning is a false positive, but I prefer actually initializing
it over masking it with av_uninit, since the code is not performance
critical.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-08 17:43:11 +02:00
Martin Storsjö
09ed8098ff rtpdec_vp8: Make sure the previous packet is returned
This is a bug from c7d4de3d73 - if the previous frame wasn't
returned yet (due to missing the final packets), but we have
enough data of it to return the first partition, we write that into
pkt and set returned_old_frame. That commit forgot returning 0 for
the case where this current packet didn't have the end_packet flag
set.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-08 17:42:29 +02:00
Martin Storsjö
92e354b655 rtpdec_vp8: Set the timestamp when returning a deferred packet
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-08 17:42:20 +02:00
Kanglin
ba8cb33273 hlsenc: Make the start_number option set the right variable
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-08 17:33:56 +02:00
Martin Storsjö
f811cd2d47 rtsp: Respect max_delay for the reordering queue when using custom IO
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-08 11:22:43 +02:00