Commit Graph

9015 Commits

Author SHA1 Message Date
Martin Storsjö c76daa89ab rtmp: Return a proper error code in handle_invoke_error
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-31 13:39:06 +02:00
Luca Barbato 30a7648730 hlsenc: make segment number unsigned
It will overflow if somebody keeps streaming for a time long enough.
2012-12-29 17:26:30 +01:00
Kanglin 27a15e0af6 hlsenc: make EXT-X-MEDIA-SEQUENCE always increase 2012-12-29 17:26:30 +01:00
Luca Barbato 9b1370aced hlsenc: do not add timestamps in different timebases
start_time is in stream timebase units while end_time is
in AV_TIME_BASE ones.
2012-12-29 17:26:30 +01:00
Kanglin 0d8cc7a3b2 hlsenc: use the correct AV_TIME_BASE macro
recording_time is in AV_TIME_BASE units.
2012-12-29 17:26:30 +01:00
Luca Barbato 0448f26c97 hlsenc: keep the playlist to the correct number of items
Consider the corner case with a list size larger than the wrap
number.
2012-12-29 17:26:30 +01:00
Luca Barbato ae85d6c9c0 hlsenc: use the segment filename in the playlist entry
Avoid calling av_get_frame_filename twice, once to generate the
segment filename and once to generate the playlist.
2012-12-29 17:26:29 +01:00
Luca Barbato 6dd93ee6f1 hlsenc: check append_entry return value 2012-12-29 17:26:29 +01:00
Luca Barbato 66f7b4862f hlsenc: use the basename to generate the list entries
The segment path is desumed from the playlist path, recording a
relative path in the playlist while serving the file could lead
to misleading results.
2012-12-29 17:26:29 +01:00
Diego Biurrun c73c87b412 cosmetics: Prettyprint codec/format/filter registration files 2012-12-28 19:18:13 +01:00
Diego Biurrun 5ad2f0bfb2 build: Add rtpenc_chain extra config option
Also fixes linking in various configs with only individual parts enabled
because the RTP muxer chaining code depends on the general RTP code,
which is now accounted for.
2012-12-28 19:18:13 +01:00
Martin Storsjö 4a9f7d2bf9 hlsenc: Don't duplicate a string constant
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-24 00:02:48 +02:00
Stefano Sabatini 3193b13aa1 hlsenc: Allocate enough space for the pattern string
If s->filename doesn't contain any period/filename extension to strip
away, the buffer will be too small to fit both strings. This isn't
any buffer overflow since the concatenation uses av_strlcat with
the right buffer size.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-24 00:02:45 +02:00
Diego Biurrun f3298f1299 Return proper error code after av_log_ask_for_sample() 2012-12-23 18:56:56 +01:00
Luca Barbato ba064ebe48 oggdec: check memory allocation 2012-12-23 12:19:15 +01:00
Luca Barbato f5f1cf5224 oggdec: K&R cosmetic formatting 2012-12-23 12:19:08 +01:00
Luca Barbato 7e98956e72 hlsenc: correctly report target duration 2012-12-23 12:13:41 +01:00
Martin Storsjö c7d4de3d73 rtpdec_vp8: Don't return known-broken packets
This is built on the assumption that the first partition of each
VP8 packet is essential for decoding any later packet - if this
partition is broken/missed, the arithmetic coder gets out of sync
and decoding the bitstream in further packet ends up with total
garbage. If packets of a frame are lost, make sure the first
partition is intact (return only this part of the packet, nothing
else), otherwise stop returning data until the next keyframe is
received.

Alternatively, one would simply not return any packets at all
until the next keyframe, if packet loss is detected.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-21 14:14:47 +02:00
Martin Storsjö 90c784cc13 rtpdec: Pass the sequence number to depacketizers
This allows depacketizers to figure out if packets have been lost.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-21 14:14:40 +02:00
Diego Biurrun 511cf612ac miscellaneous typo fixes 2012-12-21 00:18:34 +01:00
Martin Storsjö a925f723a9 rtp: Don't read priv_data unless it is allocated
This makes all users of rtpenc_chain (rtsp muxer, sapenc, mov
rtp hinting) work again, broken since 8034130e0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-20 14:25:49 +02:00
Björn Axelsson 1eaff98c83 flvenc: Check whether seeking back to the header succeeded
The FLV muxer tries to update the header in write_trailer, which is
impossible if writing to a pipe or network stream. Don't write header
data if seeking to the header fails.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-20 12:37:42 +02:00
Jernej Virag e30e8e311e sapenc: Pass the title on to the chained muxers
This makes sure it ends up in the SDP, providing a proper session name
in the SAP announcements.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-20 12:37:34 +02:00
Janne Grunau bb2bab92e7 mov: handle h263 and flv1 for codec_tag 'H','2','6','3'
The sample in https://bugzilla.libav.org/show_bug.cgi?id=393 and
samples/F4V/H263_NM_f.mp4 both have codec_tag H263 for different
codecs. H263 is apparently used by Flash Media Server for Sorensen
Spark videos.

Patch based on commit 5442083b1c by
Carl Eugen Hoyos. Fixes bug 393.
2012-12-19 14:50:14 +01:00
Diego Biurrun 523c7bd23c misc typo, style and wording fixes 2012-12-18 13:36:51 +01:00
Derek Buitenhuis 26e4f0c70f doxy: Clarify what avpriv_set_pts_info does
The "pts for a given stream" was nonsensical.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-12-17 11:20:00 -05:00
Diego Biurrun c35f0e8495 au: Reorder code so that both muxer and demuxer are under #ifdefs
This reduces code size when either piece has been disabled.
2012-12-17 17:02:22 +01:00
Diego Biurrun 81c7c817a4 cosmetics: Use consistent names for multiple inclusion guards. 2012-12-17 17:02:22 +01:00
Martin Storsjö e798085f96 rtpdec_vp8: Cosmetics: Fix bad alignment/indentation
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-16 21:33:20 +02:00
Martin Storsjö 3b2e8d1d21 rtpenc: Allow including a SDES/CNAME block in RTCP SR packets
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-16 21:32:58 +02:00
Martin Storsjö 65e053271a rtpenc_vp8: Include the picture number in VP8 packets
This makes it easier for receivers to decide what to do if data
is lost.

Refactor calculating the max payload size, to avoid hardcoding the
header size in too many places, reducing the number of lines that
have to be touched if the header is adjusted further.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-16 21:32:13 +02:00
Martin Storsjö 29d2595ad7 rtpproto: Remove unused defines
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12 16:01:24 +02:00
Martin Storsjö f3f60dcbdd rtpdec_mpeg4: Cosmetic cleanup
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12 12:18:50 +02:00
Martin Storsjö 584a017925 rtpdec: Cosmetic cleanup of the header
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12 12:18:44 +02:00
Martin Storsjö abf74a1169 rtpdec: Get rid of a useless _s suffix on a struct name
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12 12:18:38 +02:00
Martin Storsjö 7941159df6 rtpdec/enc: Remove outdated/useless/misleading comments
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12 12:18:33 +02:00
Martin Storsjö d6ec745246 rtpdec: Improve some comments
The previous comment about the buffer was wildly inaccurate and
misleading.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12 12:18:28 +02:00
Martin Storsjö e66d448c75 rtpdec: Remove unused context variables
These stem from back when both the rtp muxer and rtp depacketizing
shared the same struct.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12 12:18:22 +02:00
Martin Storsjö 81ef519252 rtpdec: Limit writing to the buffer size
This fixes potential buffer overwrites.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-12 12:18:16 +02:00
Justin Ruggles d04c17c913 swfdec: cosmetics: fix indentation 2012-12-11 09:37:17 -05:00
Justin Ruggles e70c5b034c swfdec: do better validation of tag length
Avoids trying to read a packet with 0 or negative size.
Avoids a potential infinite loop due to seeking backwards.

Partially based on a patch by Michael Niedermayer.
2012-12-11 09:36:26 -05:00
Martin Storsjö ccb59c106a rtpdec: Remove an outdated todo comment
This comment was added in e309128f, in 2002, and has been brought
along since then more or less unmodified.

The first point of the todo was implemented in dbf30963 in 2006,
the second one is not relevant to rtpdec.c (brought along from
rtp.c in 8eb793c4 in 2008) but would be more relevant to the
rtp muxer, although it isn't a good idea anyway.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-10 11:58:32 +02:00
Martin Storsjö 0d85663a47 rtpdec: Rename a static variable to normal naming conventions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-10 11:58:25 +02:00
Martin Storsjö 5d471b73d2 rtpdec: K&R formatting and spelling cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-12-09 13:36:11 +01:00
Luca Barbato 1dd1c1c884 avio: K&R cosmetic formatting 2012-12-09 09:45:45 +01:00
Mans Rullgard 91ac403b13 lavf: fix arithmetic overflows in avformat_seek_file()
The values compared here can be more than INT64_MAX apart.  Since the
difference is always positive, converting to uint64_t before subtracting
gives the correct result without overflows.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-08 19:35:16 +00:00
Luca Barbato adbe03077d hls: use a meaningful long name 2012-12-08 17:04:22 +01:00
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