Based on patch from Tomas Härdin <tomas.hardin@codemill.se>
and work by Georg Lippitsch <georg.lippitsch@gmx.at>
Changed av_calloc to av_mallocz and added overflow checks.
This fixes reading of partition packs. The code stops reading after the
operational pattern and should skip the array of essence container
labels that follow.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
This avoids (for all practical cases) the issue of reusing
the same UDP port as for an earlier connection. If the remote
doesn't know the previous session was closed, he might keep
on sending packets to that port. If we always start off trying
to open the same UDP port, we might get those packets intermixed
with the new ones.
This is occasionally an issue when testing RTSP stuff with
DSS, perhaps also with other servers.
Signed-off-by: Martin Storsjö <martin@martin.st>
This check isn't relevant in the way the code currently works.
Also change a case of if (x == 0) into if (!x).
Signed-off-by: Martin Storsjö <martin@martin.st>
The s->ssrc field is the sender's SSRC, we use ssrc + 1 to get
a collision free "unique" SSRC for ourselves in the RR part.
The SDES block in the RTCP packet should describe ourselves,
not the sender.
This was fixed for the RR part in 952139a322, but wasn't
fixed for the SDES part until now.
This could cause some Axis cameras to send RTCP BYE packets
to us due to the SSRC collision.
Signed-off-by: Martin Storsjö <martin@martin.st>
Originally, sizeof(struct MOVIentry) was 48, after the reordering,
it is 40 in my build configuration.
When writing really long mov/mp4 files, this can make a difference
- this saves a bit over 2 MB of memory per hour of video (down to
10.3 MB per hour from 12.3 MB per hour initially) for a video with
75 packets per second - 25 fps + 50 audio packets (which is the
case for AMR audio).
Signed-off-by: Martin Storsjö <martin@martin.st>
The H.264 decoder needs SPS and PPS for initialization during
multi-threaded decoding. When probed single-threaded SPS and PPS are
copied to extradata and are available for proper initialization of
the decoder before the first frame is decoded.
This isn't used in practice anywhere within libav at the moment,
but change it for consistency until it is removed.
URL_RDONLY/WRONLY were fixed in commit 5b81e29593 (after the
values that actually were used were changed at the major bump,
in commit cbea3ac8), but this flag was unintentionally left unfixed.
Signed-off-by: Martin Storsjö <martin@martin.st>
If the creation time is stored in the file as a zero, the
mov demuxer skips exporting the creation time. Currently,
files muxed without a creation time get demuxed with a
Jan 1st 1970 creation timestamp.
Signed-off-by: Martin Storsjö <martin@martin.st>
rtsp.h relies on network.h and the latter conditionally defines fallback OS
structures that rely on configure tests, which are only run if networking
is enabled.
Align IEC 61937 length_code for DTS-HD so that
(length_code & 0xf) == 0x8. This is reportedly needed with some
receivers.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
The implicit network initialization is set to be removed in the
future, but is kept for compatibility. By not doing the implicit
initialization for non-network protocols, we avoid the warning
about avformat_network_init() not being called for these, where
it really doesn't make much sense.
Signed-off-by: Martin Storsjö <martin@martin.st>
This definition is in two files, since the definitions will move
to the private header at the next bump.
Signed-off-by: Martin Storsjö <martin@martin.st>