Commit Graph

10628 Commits

Author SHA1 Message Date
Anton Khirnov 8de1ee9f72 lavf: deprecate compute_pkt_fields2
All encoders set pts and dts properly now (and have been doing that for
a while), so there is no good reason to do any timestamp guessing in the
muxer.

The newly added AVStreamInternal will be later used for storing all the
private fields currently living in AVStream.
2015-11-09 07:50:55 +01:00
Anton Khirnov aeda1121c9 lavf: factor out freeing an AVStream
It will be needed in other functions.
2015-11-08 11:49:23 +01:00
Anton Khirnov a0c71a5751 lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing
The reasoning for setting it to zero only applies to demuxing.
2015-11-08 11:48:47 +01:00
Michael Niedermayer 563e6d8603 segafilm: drop the "song and dance" for cinepak
This seems not to do anything any more since a long time, and removing
it avoids using uninitialized memory. Also change the error value
forwarding as done everywhere else.

Partly fixes: msan_uninit-mem_7fb7d24780d0_2744_R03T.CAK
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-06 21:55:15 +01:00
Paul B Mahol 1e791ee3aa segafilm: set video and audio stream duration
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-06 21:55:15 +01:00
Paul B Mahol c012c6f1a8 segafilm: implement seeking
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-06 21:55:15 +01:00
wm4 f128b8e19a mov: detect cover art pictures by content
I've got some m4a samples that had jpeg cover art marked as png. Since
these files were supposedly written by iTunes, and other software can
read it (e.g. clementine does), this should be worked around.

Since png has a very simple to detect header, while it's apparently a
real pain to detect jpeg in the general case, try to detect png and
assume jpeg otherwise. Not bothering with bmp, as I have no test case.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-03 15:03:12 +01:00
Luca Barbato 452d659aa4 msnwc_tcp: Use the correct return values
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-02 16:27:42 +01:00
Luca Barbato f8d10511fe cosmetics: msnwc_tcp: Reformat
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-02 16:27:31 +01:00
Luca Barbato 4dfbc7a755 msnwc_tcp: Correctly report failure
And prevent a memory leak

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-02 16:26:37 +01:00
Luca Barbato 1e7ff5ac69 nut: Use the correct codec_tag when multiple are available
Some codecs use the codec_tag to signal specific information and
picking the first one would lead to a broken file.

Bug-Id: 883
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-02 12:10:38 +01:00
Vittorio Giovara f53583ea6e omadec: Fix position of opening parenthesis 2015-10-30 12:46:56 +01:00
Martin Storsjö 00b62968d0 os_support: Don't try to return the service name as a string in getnameinfo
Some systems may be lacking getservbyport; the previous ifdef wasn't
quite enough since it still assumed that struct servent was defined,
as pointed out by Clément Gregoire.

Simply remove the possibility to return non-numeric services in
getnameinfo; no caller of getnameinfo within libavformat
currently try to use getnameinfo for retrieving the port number without
NI_NUMERICSERV, and falling back on getservbyport may be non-threadsafe.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-10-30 10:03:58 +02:00
Luca Barbato 9b56d5c114 avpacket: Deprecate av_dup_packet
As documented, `av_dup_packet` is broken by design, `av_packet_ref`
matches the AVFrame ref-counted API and can be safely used instead.
2015-10-26 18:00:55 +01:00
Luca Barbato d584533cf3 avformat: Rework add_to_pktbuf
Make it return an error and check its return value when it is used.
Simplify the usage by calling `av_packet_ref` internally when needed.
2015-10-26 18:00:55 +01:00
Luca Barbato ce70f28a17 avpacket: Replace av_free_packet with av_packet_unref
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.

Deprecate `av_free_packet`.
2015-10-26 18:00:55 +01:00
Luca Barbato a5d4204309 avformat: Always return ref-counted AVPacket
And drop the av_dup_packet from the input_thread.
2015-10-26 18:00:55 +01:00
Vittorio Giovara 533a619850 innoHeim/Rsupport Screen Capture Codec decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-23 14:56:43 +02:00
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