projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4584f3
)
rtpenc: Add an error message
author
Martin Storsjö
<martin@martin.st>
Sat, 4 Sep 2010 22:10:54 +0000
(
01:10
+0300)
committer
Martin Storsjö
<martin@martin.st>
Thu, 23 Feb 2012 14:30:09 +0000
(16:30 +0200)
Also return a proper error code.
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpenc.c
patch
|
blob
|
history
diff --git
a/libavformat/rtpenc.c
b/libavformat/rtpenc.c
index
4d4e168
..
604c4a0
100644
(file)
--- a/
libavformat/rtpenc.c
+++ b/
libavformat/rtpenc.c
@@
-85,8
+85,10
@@
static int rtp_write_header(AVFormatContext *s1)
int max_packet_size, n;
AVStream *st;
- if (s1->nb_streams != 1)
- return -1;
+ if (s1->nb_streams != 1) {
+ av_log(s1, AV_LOG_ERROR, "Only one stream supported in the RTP muxer\n");
+ return AVERROR(EINVAL);
+ }
st = s1->streams[0];
if (!is_supported(st->codec->codec_id)) {
av_log(s1, AV_LOG_ERROR, "Unsupported codec %x\n", st->codec->codec_id);