Commit Graph

610 Commits

Author SHA1 Message Date
Michael Niedermayer
3130e5be92 Merge commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd'
* commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd':
  rtpdec: Rename the free method to close

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:58:39 +01:00
Michael Niedermayer
7f03f75ce7 Merge commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a'
* commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a':
  libavformat: Use ffio_free_dyn_buf where applicable

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:48:50 +01:00
Michael Niedermayer
79052cd4ce Merge commit '078d43e23a7a3d64aafee8a58b380d3e139b3020'
* commit '078d43e23a7a3d64aafee8a58b380d3e139b3020':
  rtpdec: Free depacketizers if the init function failed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:32:06 +01:00
Michael Niedermayer
fa80b76b11 Merge commit 'bb4a310bb85f43e62240145a656b1e5285b14239'
* commit 'bb4a310bb85f43e62240145a656b1e5285b14239':
  rtpdec: Don't free the payload context in the .free function

Conflicts:
	libavformat/rtpdec_latm.c
	libavformat/rtpdec_mpeg4.c
	libavformat/rtpdec_mpegts.c
	libavformat/rtpdec_xiph.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:25:12 +01:00
Michael Niedermayer
64f58d20b2 Merge commit 'f4b59334bd898c47c9ac30999a346176548630a8'
* commit 'f4b59334bd898c47c9ac30999a346176548630a8':
  rtpdec: Remove the now unused .alloc field

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:17:48 +01:00
Michael Niedermayer
48e3cd4fcd Merge commit 'e72605f80bf5cbe32053a554ccc137e0a99cf3dd'
* commit 'e72605f80bf5cbe32053a554ccc137e0a99cf3dd':
  rtpdec: Allow allocating and freeing the private data without explicit functions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:42:04 +01:00
Michael Niedermayer
4c8a556a77 Merge commit 'b7a4c319fda22aa91ce29692d728ec6103b514f6'
* commit 'b7a4c319fda22aa91ce29692d728ec6103b514f6':
  rtpdec: Allow setting the need_parsing field in RTPDynamicProtocolHandler

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:33:49 +01:00
Martin Storsjö
d594dbecce rtpdec: Rename the free method to close
Many of these functions were named foo_free_context, and since
the functions no longer should free the context itself, only
allocated elements within it, the previous naming was slightly
misleading.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:50 +02:00
Martin Storsjö
8e32b1f096 libavformat: Use ffio_free_dyn_buf where applicable
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:47 +02:00
Martin Storsjö
078d43e23a rtpdec: Free depacketizers if the init function failed
This is different from how it is handled in codecs/demuxers/muxers
though (where the close function isn't called if the open function
failed), but since the number of depacketizers that have an .init
function is quite limited, this is easy to change.

The main point is that if the init function failed, we shouldn't
try to use that depacketizer at all - this makes sure that the
parse function doesn't need to check for the things that were
initialized in the init function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:39 +02:00
Martin Storsjö
bb4a310bb8 rtpdec: Don't free the payload context in the .free function
This makes it more consistent with depacketizers that don't have any
.free function at all, where the payload context is freed by the
surrounding framework. Always free the context in the surrounding
framework, having the individual depacketizers only free any data
they've specifically allocated themselves.

This is similar to how this works for demuxer/muxers/codecs - a
component shouldn't free the priv_data that the framework has
allocated for it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:35 +02:00
Martin Storsjö
f4b59334bd rtpdec: Remove the now unused .alloc field
Always use the .priv_data_size field instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:32 +02:00
Michael Niedermayer
eb24186b45 Merge commit '74d318f138f2a3f1b2fe81aea826d80d1e60f54c'
* commit '74d318f138f2a3f1b2fe81aea826d80d1e60f54c':
  rtsp: Fix the indentation of a linewrapped statement

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:03:57 +01:00
Michael Niedermayer
c6792275f4 Merge commit '26524e358147aade6e9dd18fff42d61b966bbc70'
* commit '26524e358147aade6e9dd18fff42d61b966bbc70':
  rtsp: Interpret the text media type as AVMEDIA_TYPE_DATA

See: afb0e5a810
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 21:43:13 +01:00
Martin Storsjö
e72605f80b rtpdec: Allow allocating and freeing the private data without explicit functions
This can reduce the amount of boilerplate in simple depacketizers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:23:37 +02:00
Martin Storsjö
b7a4c319fd rtpdec: Allow setting the need_parsing field in RTPDynamicProtocolHandler
This allows getting rid of quite a bit of boilerplate in depacketizers.

The default value (initializing need_parsing to 0, aka
AVSTREAM_PARSE_NONE) is the same as it is initialized to by default
in AVStream.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:22:21 +02:00
Martin Storsjö
74d318f138 rtsp: Fix the indentation of a linewrapped statement
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:20:10 +02:00
Martin Storsjö
26524e3581 rtsp: Interpret the text media type as AVMEDIA_TYPE_DATA
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:19:37 +02:00
Michael Niedermayer
83f18410bd Merge commit 'cdcc370293a159c321e41af7f0eef141c62d698d'
* commit 'cdcc370293a159c321e41af7f0eef141c62d698d':
  rtsp: punch holes again after pause

See: 22bb5bd7a3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-23 21:43:18 +01:00
Gilles Chanteperdrix
cdcc370293 rtsp: punch holes again after pause
When a client behind a NAT issues a pause command, and stay paused for a
long time, the router may stop the RTP/RTCP port redirection. Resend the
hole punching packets before each PLAY command to cause the router to
restart the port redirection in that case.

Move the existing code for sending the packets from the SETUP phase
to the PLAY phase.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-23 16:55:56 +02:00
Gilles Chanteperdrix
4438d1c6ed rtsp: parse lang attribute in SDP
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 23:37:24 +02:00
Gilles Chanteperdrix
c7ad1f562b avformat/rtsp: parse lang attribute in SDP
Reviewed-by: Thomas Volkert <silvo@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 00:49:08 +01:00
Gilles Chanteperdrix
afb0e5a810 avformat/rtsp: allow receiving subtitles via RTP
Reviewed-by: Thomas Volkert <silvo@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-13 00:01:02 +01:00
Michael Niedermayer
e360d030b3 avformat/rtsp: Use avio_closep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-08 20:19:20 +01:00
Michael Niedermayer
f7da4b1cf1 avformat/rtsp: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-26 14:59:29 +01:00
Michael Niedermayer
bf6e332cb4 Merge commit '76ccf114a6c107218e2a1948afc1d0fb3ac7ba0b'
* commit '76ccf114a6c107218e2a1948afc1d0fb3ac7ba0b':
  rtsp: check ffurl_get_file_handle() return value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 05:04:24 +01:00
Vittorio Giovara
76ccf114a6 rtsp: check ffurl_get_file_handle() return value
CC: libav-stable@libav.org
Bug-Id: CID 717844
2014-12-18 23:27:14 +01:00
Michael Niedermayer
1537d0b432 Merge commit '604c9b1196c70d79bbbc1f23e75f6a8253a74da3'
* commit '604c9b1196c70d79bbbc1f23e75f6a8253a74da3':
  rtsp: move the CONFIG_ macros to the beginning of the check

Conflicts:
	libavformat/rtsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-02 21:39:05 +01:00
Vittorio Giovara
604c9b1196 rtsp: move the CONFIG_ macros to the beginning of the check
With --disable-optimizations, the DCE of some compilers does not remove
such unused code, causing linking failure.
2014-12-02 15:28:22 +00:00
Michael Niedermayer
2c5ae57776 Merge commit '6df9d9b55d3f56ee7782639a7678eeeaf77f14ea'
* commit '6df9d9b55d3f56ee7782639a7678eeeaf77f14ea':
  lavf: Use av_gettime_relative

Conflicts:
	libavformat/hls.c

See: f78bc96b7c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-24 12:40:36 +02:00
Martin Storsjö
6df9d9b55d lavf: Use av_gettime_relative
The ones left using av_gettime are NTP timestamps (for RTCP,
which is specified to send the actual current realtime clock
in RTCP SR packets), and the NUT muxer timestamper, which is
documented as using wallclock time.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-24 09:53:45 +03:00
Andrey Utkin
08e6832a94 avformat/rtsp: pass return code from ffurl_open() on its failure
Previously, AVERROR(EIO) was returned. Now the value is passed from
lower level, thus it is possible to distinguish ECONNREFUSED, ETIMEDOUT,
ENETUNREACH etc.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-23 23:53:14 +02:00
Michael Niedermayer
7f2af3f56b avformat/rtsp: add av_assert0() to clarify that the else case is supposed to be unreachable
If its reachable then theres a bug as err would be uninitialized

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-23 23:48:45 +02:00
Andrey Utkin
282c9354f1 avformat/rtsp: Use ff_rtsp_averror()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-21 03:52:27 +02:00
Michael Lynch
460b509a34 rtsp: Check a memory allocation
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-16 09:19:03 +03:00
Michael Lynch
c69f230a3a avformat/rtsp: check memory allocation
Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Commit message by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-15 20:04:32 +02:00
Michael Niedermayer
c9791925a1 Merge commit '8b2e9636c57b22582143467a8a06b509b47b92f9'
* commit '8b2e9636c57b22582143467a8a06b509b47b92f9':
  rtsp: Support tls-encapsulated RTSP

Conflicts:
	libavformat/rtsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 21:18:41 +02:00
Luca Barbato
8b2e9636c5 rtsp: Support tls-encapsulated RTSP 2014-10-10 16:29:06 +02:00
Michael Niedermayer
6441d522e9 Merge commit '2f172f1ae984b763c06069adb51d0053b3834f4b'
* commit '2f172f1ae984b763c06069adb51d0053b3834f4b':
  rtsp: Clear the session id on redirects

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-25 01:08:44 +02:00
Martin Storsjö
2f172f1ae9 rtsp: Clear the session id on redirects
This fixes handling redirects in case the server provided a session
id within the redirect reply.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-24 23:34:02 +03:00
James Almer
5b12b4fc4b lavf/mpegts: rename ff_mpegts_parse_*() to avpriv_mpegts_parse_*()
The were wrongly being exported and used by libavdevice

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-07 04:28:11 +02:00
Michael Niedermayer
ca384d708b avformat/rtsp: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-30 05:08:16 +02:00
Moritz Barsnick
10b8481a26 fix several typos 2014-06-20 10:21:31 -08:00
Michael Niedermayer
dacc4cb115 Merge commit 'c385313d2590fd26e26bb9bdacddef78162ab490'
* commit 'c385313d2590fd26e26bb9bdacddef78162ab490':
  rtsp: Support misordered fmtp rtpmap

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 23:27:01 +02:00
Michael Niedermayer
be94f5c171 Merge commit 'c9c1e00f95350e7a36b0d05a03939c7f6438e371'
* commit 'c9c1e00f95350e7a36b0d05a03939c7f6438e371':
  rtsp: Factor out fmtp parsing

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 23:22:12 +02:00
Joshua Kordani
c385313d25 rtsp: Support misordered fmtp rtpmap
Issue present in Avigilon IP cameras.
2014-06-18 22:03:40 +02:00
Luca Barbato
c9c1e00f95 rtsp: Factor out fmtp parsing 2014-06-18 22:03:40 +02:00
Michael Niedermayer
8c895ae73f Merge commit 'f797b134cad4d248b1c8955659997980d0668bc3'
* commit 'f797b134cad4d248b1c8955659997980d0668bc3':
  rtpenc_chain: Don't copy the time base to the source stream by default

See: 1fe40e1b05
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-31 12:53:46 +02:00
Martin Storsjö
f797b134ca rtpenc_chain: Don't copy the time base to the source stream by default
Only copy it manually in the muxers where it makes sense (rtspenc,
sapenc). Don't touch the original AVStream in movenchint, where
the original AVStream should be kept untouched.

This fixes the normal tracks in RTP hinted files after
abb810db - the hint tracks were ok while the normal media tracks
were broken, noticed by Michael Niedermayer.

This reverts abb810db but achieves the same effect for the other
muxers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-05-31 12:02:23 +03:00
Fred Rothganger
3f3229cd10 avformat: extracting NTP timestamp from RTCP
For muxing, it accepts
both 0 and AV_NOPTS_VALUE. For demuxing, it will present
AV_NOPTS_VALUE when start_time_realtime is unknown.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-12 13:33:14 +01:00