This is used for mapping AVStreams back to their corresponding
RTSPStream. Since d9c0510, the RTSPStream pointer isn't stored in
AVStream->priv_data any longer, breaking this mapping from AVStreams
to RTSPStreams.
Also, we don't need to clear the priv_data in rdt cleanup any longer,
since it isn't set to duplicate pointers.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This avoids having the chained AVStream->codec point to the same
AVCodecContext owned by the outer AVStream. The downside is that
changes to the AVCodecContext made after calling av_write_header
cannot be detected automatically within the chained muxer.
This avoids having to manually unlink the chained AVStream->codec
by setting it to null before freeing the chained muxer via generic
freeing functions.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This fixes memory leaks in the RTSP muxer and RTP hinting in the
mov muxer present since SVN rev 25418.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
For mpegts in RTP, there isn't a direct mapping between RTSPStreams
and AVStreams, and the RTSPStream isn't ever stored in
AVStream->priv_data, which was earlier leaked. The fix for this
leak, in ea7f080749, lead to
double frees for other, normal RTP streams.
This patch avoids storing RTSPStreams in AVStream->priv_data, thus
avoiding the double free. The RTSPStreams are always available via
RTSPState->rtsp_streams anyway.
Tested with MS-RTSP, RealRTSP, DSS and mpegts/RTP.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
If filtered, only packets from the right source address and port
are received.
To test, play back e.g. some mpeg4 video RTSP stream (where the
video stream is the first stream in the presentation) over UDP.
While receiving this stream, send another stream to the same port:
ffmpeg -re -i <whatever> -vcodec mpeg4 -an -f rtp
rtp://127.0.0.1:5000?localport=1234
Normally, the RTSP playback reports lots of errors at this point.
If the RTSP stream has the ?filter_src option enabled, these
interferring packets are ignored.
Originally committed as revision 26246 to svn://svn.ffmpeg.org/ffmpeg/trunk
This avoids having a large temporary buffer in the struct used for
storing the rtsp reply headers.
Originally committed as revision 26192 to svn://svn.ffmpeg.org/ffmpeg/trunk
This allows ff_rtsp_parse_line to do more changes directly in RTSPState
when parsing the reply, instead of having to store large amounts of
temporary data in RTSPMessageHeader.
Originally committed as revision 26190 to svn://svn.ffmpeg.org/ffmpeg/trunk
Emitted timestamps in each stream start from 0, for the first received
RTP packet. Once an RTCP packet is received, that one is used for
sync, emitting timestamps that fit seamlessly into the earlier ones.
Originally committed as revision 26187 to svn://svn.ffmpeg.org/ffmpeg/trunk
For example MS-RTSP doesn't have RTPDemuxContexts for all streams.
This fixes issue 2448.
Originally committed as revision 26107 to svn://svn.ffmpeg.org/ffmpeg/trunk
This fixes a crash if we requested TCP interleaved transport, but the
server replies with transport data for UDP. According to the RFC, the
server isn't allowed to respond with another transport type than the
one requested.
Originally committed as revision 26077 to svn://svn.ffmpeg.org/ffmpeg/trunk
This also reverts SVN rev 26016, which incorrectly overwrote the time base
with 90 kHz for all streams, regardless of what was set by the SDP parsing.
The stream that triggered the fix in 26016 still works after this commit.
Originally committed as revision 26022 to svn://svn.ffmpeg.org/ffmpeg/trunk
This fixes cases where the RTP time base and the sample rate of the stream
differ. Previously, the AVStream time_base was unconditionally set to
the sample rate (which initially was set to one value when parsing the
rtpmap field in the SDP, but later overridden by an a=SampleRate field).
Additionally, this makes the code actually use the stream time base set
in rtpmap for video codecs, instead of hardcoding it to always be 90 kHz.
Originally committed as revision 25908 to svn://svn.ffmpeg.org/ffmpeg/trunk
This may be needed to avoid calls to implicitly defined functions
(that will be removed by dead code elimination later anyway).
Originally committed as revision 25585 to svn://svn.ffmpeg.org/ffmpeg/trunk
This allows compilation of one of them without requiring the others'
dependencies to be present.
Originally committed as revision 25535 to svn://svn.ffmpeg.org/ffmpeg/trunk
The demuxer inspects the payload type of a received RTP packet and
handles the cases where the content is fully described by the payload type.
Originally committed as revision 25527 to svn://svn.ffmpeg.org/ffmpeg/trunk
The new object file is added to the SDP demuxer in the makefile, since it
is needed in both the RTSP muxer and demuxer and in the SDP demuxer, due
to the current code coupling.
Originally committed as revision 25410 to svn://svn.ffmpeg.org/ffmpeg/trunk
This makes the code dependencies correct. Previously, the SDP demuxer
wasn't buildable on its own.
This also reverts rev 25343.
Originally committed as revision 25354 to svn://svn.ffmpeg.org/ffmpeg/trunk
They reside within a large CONFIG_RTSP_DEMUXER block and are thus pointless.
Originally committed as revision 25343 to svn://svn.ffmpeg.org/ffmpeg/trunk
It is only useful for debugging, so it doesn't have to be shown every time.
Originally committed as revision 25323 to svn://svn.ffmpeg.org/ffmpeg/trunk
Do the same change for ff_rdt_parse_packet, too, to keep the interfaces
similar.
Originally committed as revision 25289 to svn://svn.ffmpeg.org/ffmpeg/trunk
message, if available (RFC 2326, section 12.39), fixes issue 2212.
Patch by John Wimer <john at god vtic net>.
Originally committed as revision 25032 to svn://svn.ffmpeg.org/ffmpeg/trunk
This fixes a bug from rev 22917. Now RTSP streams where the individual RTCP
sender reports aren't sent at the same time actually are synced properly.
Originally committed as revision 25029 to svn://svn.ffmpeg.org/ffmpeg/trunk
this prevents a time-out which closes the TCP connection and kills our
session.
see "Re: [FFmpeg-devel] [PATCH] rtsp.c: keep-alive" thread on mailinglist.
Originally committed as revision 24785 to svn://svn.ffmpeg.org/ffmpeg/trunk
That makes easier understand what went wrong.
In debug mode the whole reply gets printed.
Originally committed as revision 24212 to svn://svn.ffmpeg.org/ffmpeg/trunk
ff_url_split() is retained as an alias, as it was used by ffserver,
to avoid breaking ABI compatibility with it.
Originally committed as revision 23822 to svn://svn.ffmpeg.org/ffmpeg/trunk
Also make the RTSP protocol use url_alloc and url_connect instead of relying
on the delay open behaviour.
Originally committed as revision 23710 to svn://svn.ffmpeg.org/ffmpeg/trunk
This removes some useless copying of handles, and simplifies error handling.
Patch by Josh Allmann, joshua dot allmann at gmail
Originally committed as revision 23648 to svn://svn.ffmpeg.org/ffmpeg/trunk
Since rtsp_hd isn't assigned to rt->rtsp_hd until after the setup phase,
the initialized URLContext could be leaked on failures.
Originally committed as revision 23643 to svn://svn.ffmpeg.org/ffmpeg/trunk
Since the parsing of Vorbis/Theora fmtp headers is handled by the
parse_sdp_a_line function pointer now, the buffer in sdp_parse_fmtp
doesn't need to be this large any longer.
Patch by Josh Allmann, joshua dot allmann at gmail
Originally committed as revision 23599 to svn://svn.ffmpeg.org/ffmpeg/trunk
Done in preparation for RTSP over HTTP.
Patch by Josh Allmann, joshua dot allmann at gmail
Originally committed as revision 23494 to svn://svn.ffmpeg.org/ffmpeg/trunk
in its place.
av_metadata_set() is going to be dropped at the next major bump.
Originally committed as revision 22961 to svn://svn.ffmpeg.org/ffmpeg/trunk
If these aren't reset, the timestamps make a huge jump when the next RTCP
is received.
Originally committed as revision 22918 to svn://svn.ffmpeg.org/ffmpeg/trunk
In order to sync RTP streams that get their initial RTCP timestamp at
different times, propagate the NTP timestamp of the first RTCP packet
to all other streams.
This makes the timestamps of returned packets start at (near) zero instead
of at any random offset.
Originally committed as revision 22917 to svn://svn.ffmpeg.org/ffmpeg/trunk
This patch also changes FF_NETERROR() to be an AVERROR(), i.e. it is always
negative, whereas it was previously positive.
Originally committed as revision 22887 to svn://svn.ffmpeg.org/ffmpeg/trunk
The status_code field is read in the fail codepath, where it could be
read uninitialized earlier. Found by clang.
Originally committed as revision 22801 to svn://svn.ffmpeg.org/ffmpeg/trunk
This helps if the URL (erroneously?) contains question marks within the path.
Originally committed as revision 22643 to svn://svn.ffmpeg.org/ffmpeg/trunk
Don't modify the user-specified s->filename at all, keep all modifications
locally and in rt->control_uri.
Originally committed as revision 22642 to svn://svn.ffmpeg.org/ffmpeg/trunk
Currently, the caller doesn't get the status_code and location for rediects,
since rtsp_setup_input_streams uses a copy of RTSPMessageHeader of its own.
Originally committed as revision 22630 to svn://svn.ffmpeg.org/ffmpeg/trunk
This makes sure that the streams get correctly synchronized when viewed,
previously the streams were out of sync by as much time as it took
between the initialization of the individual muxers.
Originally committed as revision 22545 to svn://svn.ffmpeg.org/ffmpeg/trunk
This fixes compilation on some OSes
Patch by Dave Yeo, daveryeo at telus dot net
Originally committed as revision 22426 to svn://svn.ffmpeg.org/ffmpeg/trunk
instead of using the original host name, since the RTP (and UDP) protocols
may choose another IP address if the host name resolves into several different
addresses.
Originally committed as revision 22398 to svn://svn.ffmpeg.org/ffmpeg/trunk
This ensures proper escaping of numerical IPv6 addresses.
The RTSP (de)muxer needs its own network initialization, since it isn't
a protocol and url_open hasn't been called yet.
Originally committed as revision 22226 to svn://svn.ffmpeg.org/ffmpeg/trunk
and setting up the internal RTSPStream data structures when using
the RTSP code in muxer mode.
Originally committed as revision 21965 to svn://svn.ffmpeg.org/ffmpeg/trunk
known as rtsp_connect()) can be used in the RTSP muxer.
Patch by Martin Storsjö <$firstname $firstname st>.
Originally committed as revision 21915 to svn://svn.ffmpeg.org/ffmpeg/trunk
function (rtsp_setup_input_streams()), as preparation for the upcoming
RTSP muxer.
Patch by Martin Storsjö <$firstname $firstname st>.
Originally committed as revision 21914 to svn://svn.ffmpeg.org/ffmpeg/trunk
don't send them when acting as a RTSP muxer.
Patch by Martin Storsjö <$firstname $firstname st>.
Originally committed as revision 21913 to svn://svn.ffmpeg.org/ffmpeg/trunk