diff options
author | Martin Storsjö <martin@martin.st> | 2010-09-05 02:10:54 +0400 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-02-23 18:30:09 +0400 |
commit | ada4e362b9fa8cef033afb040f99b07069a7a5ee (patch) | |
tree | d7de374c5bf2d9787e37b12ecc519d84b986c9ea /libavformat/rtpenc.c | |
parent | c4584f3c1ff3997fd98c3cc992fe82cb99f6b248 (diff) |
rtpenc: Add an error message
Also return a proper error code.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r-- | libavformat/rtpenc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 4d4e168c97..604c4a0552 100644 --- 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); |