[FFmpeg-devel] [PATCH] lavf/mpegenc: provide better feedback in case of invalid media type
Michael Niedermayer
michael at niedermayer.cc
Thu Aug 27 17:59:20 CEST 2015
On Thu, Aug 27, 2015 at 05:42:55PM +0200, Stefano Sabatini wrote:
> ---
> libavformat/mpegenc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
> index 2520f49..b3ee2a0 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);
> }
LGTM
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150827/5f72c2c2/attachment.sig>
More information about the ffmpeg-devel
mailing list