diff options
author | Martin Storsjö <martin@martin.st> | 2014-12-07 01:42:06 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2014-12-08 11:59:12 +0200 |
commit | 29bc7bfba288ff8572ed967a8752a1dbde7b724b (patch) | |
tree | dddf575b56b518b290e91fedbd73be7a649287e8 | |
parent | 6a880090cd75b6c31b5ee1f088b6578a293099c6 (diff) | |
download | ffmpeg-29bc7bfba288ff8572ed967a8752a1dbde7b724b.tar.gz |
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@martin.st>
-rw-r--r-- | libavformat/rtpproto.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index d5ecfc8898..1171fc2f14 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; |