summaryrefslogtreecommitdiff
path: root/libavformat/mpegenc.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2015-08-27 17:41:52 +0200
committerStefano Sabatini <stefasab@gmail.com>2015-08-27 18:07:43 +0200
commit57cd2f7777a316a447301a7d4b5d1c01da200661 (patch)
tree47a2ac0000430e42a993a34099135545e05a309d /libavformat/mpegenc.c
parent0c800b27611cadd64f46fd1bbd9dc8bb87fe168b (diff)
lavf/mpegenc: provide better feedback in case of invalid media type
Diffstat (limited to 'libavformat/mpegenc.c')
-rw-r--r--libavformat/mpegenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 2520f49db1..b3ee2a09b9 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -410,7 +410,9 @@ static av_cold int mpeg_mux_init(AVFormatContext *ctx)
stream->max_buffer_size = 16 * 1024;
break;
default:
- return -1;
+ av_log(ctx, AV_LOG_ERROR, "Invalid media type %s for output stream #%d\n",
+ av_get_media_type_string(st->codec->codec_type), i);
+ return AVERROR(EINVAL);
}
stream->fifo = av_fifo_alloc(16);
if (!stream->fifo)