[FFmpeg-cvslog] rtpproto: Write a warning if the input data written isn't RTP packetized
Martin Storsjö
git at videolan.org
Mon Dec 8 12:24:45 CET 2014
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Sun Dec 7 01:42:06 2014 +0200| [29bc7bfba288ff8572ed967a8752a1dbde7b724b] | committer: Martin Storsjö
rtpproto: Write a warning if the input data written isn't RTP packetized
Tell the user that the RTP muxer needs to be used to packetize
the data - using the RTP protocol on its own isn't enough.
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=29bc7bfba288ff8572ed967a8752a1dbde7b724b
---
libavformat/rtpproto.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c
index d5ecfc8..1171fc2 100644
--- a/libavformat/rtpproto.c
+++ b/libavformat/rtpproto.c
@@ -411,6 +411,10 @@ static int rtp_write(URLContext *h, const uint8_t *buf, int size)
if (size < 2)
return AVERROR(EINVAL);
+ if (buf[0] != (RTP_VERSION << 6))
+ av_log(h, AV_LOG_WARNING, "Data doesn't look like RTP packets, "
+ "make sure the RTP muxer is used\n");
+
if (s->write_to_source) {
int fd;
struct sockaddr_storage *source, temp_source;
More information about the ffmpeg-cvslog
mailing list