diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2015-08-27 18:41:52 +0300 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2015-08-27 19:07:43 +0300 |
commit | 57cd2f7777a316a447301a7d4b5d1c01da200661 (patch) | |
tree | 47a2ac0000430e42a993a34099135545e05a309d | |
parent | 0c800b27611cadd64f46fd1bbd9dc8bb87fe168b (diff) |
lavf/mpegenc: provide better feedback in case of invalid media type
-rw-r--r-- | libavformat/mpegenc.c | 4 |
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) |