Commit Graph

10610 Commits

Author SHA1 Message Date
Luca Barbato
18f9308e6a mpjpeg: Cope with multipart lacking the initial CRLF
Some server in the wild do not put the boundary at a newline
as rfc1347 7.2.1 states.
Cope with that by reading a line and if it is not empty reading
a second one.

Reported-By: bitingsock
2015-10-23 11:56:38 +02:00
Luca Barbato
22f4d9c303 img2enc: Make sure the images are atomically written
Users that want to generate a live-preview and serve it
would otherwise get partial images.
2015-10-23 11:55:14 +02:00
Martin Storsjö
5ea5a24eb7 movenc: Honor flush requests with delay_moov, when some tracks lack samples
This also makes sure that a fragmented file without the empty_moov
flag (i.e. with a non-empty initial moov fragment) actually gets
written, if some of the tracks turn out to not have any samples.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-10-23 10:37:49 +03:00
Martin Storsjö
e02dcdf6bb rtsp: Allow $ as interleaved packet indicator before a complete response header
Some RTSP servers ("HiIpcam/V100R003 VodServer/1.0.0") respond to
our keepalive GET_PARAMETER request by a truncated RTSP header
(lacking the final empty line to indicate a complete response
header). Prior to 764ec70149, this worked just fine since we
reacted to the $ as interleaved packet indicator anywhere.

Since $ is a valid character within the response header lines,
764ec70149 changed it to be ignored there. But to keep
compatibility with such broken servers, we need to at least
allow reacting to it at the start of lines.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-10-23 10:31:55 +03:00
Vittorio Giovara
f890677d05 Replace any remaining avpicture function with imgutils
avpicture_get_size() -> av_image_get_buffer_size()

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-21 11:59:59 +02:00
Andrey Utkin
c134850669 httpauth: Add space after commas in HTTP/RTSP auth header
This fixes access to Grandstream cameras, which return 401 otherwise.
VLC sends Authorization: header with spaces between parameters, and it
is known to work with Grandstream devices and broad range of other HTTP
and RTSP servers, so author considers switching to such behaviour safe.

See RFC 2617 (HTTP Auth).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-14 14:35:34 +02:00
Michael Niedermayer
e55376a1fd rtmpproto: Write correct flv packet sizes at the end of packets
In one case it was written as zero, one case left it uninitialized,
missed the 11 bytes for the flv header.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-14 14:35:33 +02:00
Luca Barbato
34ed5c2e4d avformat: Do not use AVFMT_RAWPICTURE
There are no formats supporting it anymore and it is deprecated.
Update the documentation accordingly.
2015-10-13 13:43:29 +02:00
Luca Barbato
b9ece15a01 nullenc: Use the wrapped avframe pseudo-encoder 2015-10-10 14:50:42 +02:00
Luca Barbato
d00a8fd417 yuv4mpeg: Use the wrapped avframe pseudo-encoder 2015-10-10 14:50:42 +02:00
Alexandra Hájková
00cc10aee3 asfdec: do not skip padding if offset is above packet size - padding
Sample-Id: https://samples.libav.org/asf-wmv/demux-asf-assert-failed.wmv

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-08 21:55:31 +02:00
John Stebbins
f56a085593 matroskaenc: Don't write a track language tag
"language" is not an offical matroska tag.
Track languages are specified with the MATROSKA_ID_TRACKLANGUAGE ebml.
Writing the tag overrides the ebml specified language during playback with
libav and some other players.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-10-03 13:44:35 +02:00
Luca Barbato
74942685cb hls: Check av_opt_set_dict return value as well
Bug-Id: CID 1320426
2015-10-01 13:51:13 +02:00
Vittorio Giovara
9a3202a98b Screenpresso SPV1 decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-30 16:45:11 +02:00
Thierry Foucu
c5e5e63062 riff: Add support for RV40 codec in AVI
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-29 14:33:01 +02:00
wm4
948f3c19a8 lavc: Make AVPacket.duration int64, and deprecate convergence_duration
Note that convergence_duration had another meaning, one which was in
practice never used. The only real use for it was a 64 bit replacement
for the duration field. It's better just to make duration 64 bits, and
to get rid of it.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-29 14:33:00 +02:00
wm4
cc8db76061 mpegts: use avcodec_get_type() to set codec_type
Note that this slightly changes behavior: it sets AVMEDIA_TYPE_UNKNOWN
if the codec type is unknown. This should be ok.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-28 10:50:50 +02:00
Luca Barbato
22cc57da64 rtpdec: Forward the memory failure
And avoid a memory leak.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-16 20:20:16 +02:00
Eloi BAIL
1ec611a102 rtsp: warning when max_delay reached
packets are queued due to packet reordering until the queue reach its
maximal size or max delay is reached.
This commit adds a warning trace when max delay is reached.

Signed-off-by: Eloi BAIL <eloi.bail@savoirfairelinux.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-16 09:58:12 +03:00
Eloi BAIL
d555bd69e7 rtpdec: inform jitter buffer size
This commit print as AV_LOG_VERBOSE the jitter buffer
size. It might be the default value or the value set by application.

Signed-off-by: Eloi BAIL <eloi.bail@savoirfairelinux.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-16 09:55:51 +03:00
Eloi BAIL
ff7f6ea9db rtpdec: add a trace when jitter buffer is full
This commit adds a warning trace when jitter buffer
is full. It helps to understand leading decoding issues.

Signed-off-by: Eloi BAIL <eloi.bail@savoirfairelinux.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-16 09:54:14 +03:00
Martin Storsjö
3c525b8b47 rtpdec: Increase the max size of the jitter buffer to 500 packets
Since the actual max length of the jitter buffer is restricted by
max_delay, this shouldn't harm the overall latency (assuming that
max_delay is set properly), while allowing packet reordering with
a larger number of packets (which may be required with high bitrate
video).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-15 09:35:44 +03:00
Vittorio Giovara
10de408738 lavf: Update to the new crypto API 2015-09-13 17:34:45 +02:00
Alexandra Hájková
c0a49077ea asfdec: add more checks for size left in asf packet buffer
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 14:23:32 +02:00
Luca Barbato
41ed749fe9 ogg: Do not try to use the parser if it is not present
Bug-Id: 886
CC: libav-stable@libav.org
2015-09-10 14:47:33 +02:00
Alexandra Hájková
77cf236689 asfdec: alloc enough space for storing name in asf_read_metadata_obj
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-06 20:48:36 +02:00
Martin Storsjö
7cad1bf075 mov: Allow more than one keyframe per trun
The previous restriction was partially designed to fix certain
(broken) samples from bug 215. There should be no restriction on the
number of keyframes per fragment or trun.

The spec suggests that all frames lacking MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC
are key frames, but we require the flag MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES
to be unset as well. This works for (possibly broken) media that never
sets the NON_SYNC flag and should also be correct for any spec-compliant
file.

For files that never set either of the flags, all samples are marked
as keyframes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-06 21:24:37 +03:00
Vittorio Giovara
599fe93a84 riff: Add AVj2 fourcc for Avid jpeg2000 2015-09-04 17:51:29 +02:00
Sean McGovern
9ad1e0c12c mux: Make sure that the data is actually written
And forward the error if it is not.

Bug-Id: 881

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-03 13:39:34 +02:00
Sean McGovern
e05f7ed543 file: properly forward errors from file_read() and file_write()
Bug-Id: 881

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-03 13:39:34 +02:00
Vittorio Giovara
c45fcf30cf DXV decoder
Support all DXDI and DXD3 normal quality videos.
2015-09-02 22:22:02 +02:00
Vittorio Giovara
e88103a7f9 Bump major versions of all libraries
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-08-28 16:04:28 +02:00
Vittorio Giovara
4e649debcf Postpone API-incompatible changes until the next bump 2015-08-28 16:04:28 +02:00
Vittorio Giovara
01bcc2d5c2 lavc: Drop deprecated destruct_packet related functions
Deprecated in 10/2012.
2015-08-28 16:01:16 +02:00
Luca Barbato
e176639bcb webm: Explicitly select libvpx, libopus and libvorbis encoders
And update the preference for the newer codecs now that the libraries
seem stable and widespread enough.

Bug-Id: 695
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-25 19:47:43 +02:00
Luca Barbato
2157df425b hlsenc: Support outputting specific versions
Right now only version 2 and version 3 are supported.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-25 19:43:58 +02:00
Alexandra Hájková
317cfaa5e0 asfdec: prevent the memory leak in the asf_read_metada_obj
also do not return the error code but just break reading
metadata object in the case of the aspect ratio reading failure

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-16 20:00:37 +02:00
Luca Barbato
72839fce64 hlsenc: Use AV_TIME_BASE units for all the computations
Do not risk mixing different timebases.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-16 19:02:16 +02:00
Martin Storsjö
26ac22e5e7 movenc: Add a new flag for writing global sidx indexes for dash
The double meaning of the faststart flag (moving a moov atom
to the start of files, making them streamable, for non-fragmented
files, vs inserting a global sidx index at the start of files
for fragmented files) is confusing - see 40ed1cbf1 for
explanation of its origins.

Since the second meaning of the flag hasn't been part of any
libav release yet, just rename it to get rid of the confusion
without any extra deprecation (which wouldn't get rid of the
potential confusion, of users adding -movflags faststart
even for fragmented files, where it isn't needed for making
them "streamable").

This gets back the old behaviour, where -movflags faststart
doesn't have any effect for fragmented files.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-08-12 13:41:46 +03:00
Martin Storsjö
5f200bbf98 movenc: Place the sidx index after the initial moov/mdat pair
For fragmented files with non-empty moov, with a fragment index
(sidx), place the index after the initial moov/mdat pair.

Previously, for this pathological case, the index was written
at the start of the file.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-08-10 09:46:14 +03:00
Martin Storsjö
83f254e65f movenc: Rename reserved_moov_pos to reserved_header_pos
The same field is also used for writing the sidx index header,
for fragmented files, when the faststart flag is used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-08-10 09:46:07 +03:00
Martin Storsjö
8e34089e26 movenc: Check that frag_info entries exist in mov_write_sidx_tag
This fixes crashes with pathological cases when trying to write
a sidx index (via the -movflags faststart option, in combination
with fragmenting options), when no fragments actually have been
written. (This is possible if the empty_moov flag isn't used,
so that all actual packet data is written in the moov/mdat pair,
and no moof/mdat pairs have been written.)

In these pathological cases, no sidx should be written at all.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-08-10 09:46:03 +03:00
Luca Barbato
e5997152f5 asf: Use time_t where needed
gmtime takes a time_t not an uint64_t.
2015-08-04 21:40:04 +02:00
Alexandra Hájková
944f60866f asfdec: read values properly
The length of BOOL values is 16 bits in the Metadata Object but
32 bits in the Extended Content Description Object.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-04 21:33:55 +02:00
Alexandra Hájková
fdbc544d29 asfdec: prevent the memory leak while reading metadata
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-08-02 08:43:51 +02:00
Alexandra Hájková
33dc1913ab asfdec: remove improper assignement that caused wrong timestamps
and remove unneeded variable

Sample-Id: https://samples.libav.org/asf-wmv/asf-code-53/movn018.asf

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-31 09:10:05 +02:00
Alexandra Hájková
78491fe8cf asfdec: do not export empty metadata
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-31 09:09:27 +02:00
Alexandra Hájková
cd4d9df227 asfdec: free AVDictionaries properly when closing the demuxer
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-31 07:23:20 +02:00
Martin Storsjö
764ec70149 rtsp: Only interpret $ as interleaved packet indicator at the start of replies
Allow $ as character anywhere within normal RTSP replies - both
within the lines, and as the first character of RTSP header lines.
(The existing old comment indicated that an inline packet could
start at any line within a RTSP reply header, but that doesn't
sound valid to me, and I'm not sure if the existing code
handled that correctly either.)

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-07-30 16:59:36 +03:00
Luca Barbato
0c73a5a53c hls: Save and forward avio options
Make possible to send the custom headers and override the user agent.

Reported-by: BenWonder
2015-07-30 11:21:26 +02:00