From a839dbb94ed9244a1678339dbb05355d8257a126 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 26 Mar 2012 13:02:54 +0200 Subject: dvenc: print allowed profiles if the video doesn't conform to any of them. --- libavcodec/dv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libavcodec/dv.c') diff --git a/libavcodec/dv.c b/libavcodec/dv.c index aba94eba4f..83b6960f38 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -323,9 +323,11 @@ av_cold int ff_dvvideo_init(AVCodecContext *avctx) static av_cold int dvvideo_init_encoder(AVCodecContext *avctx) { if (!avpriv_dv_codec_profile(avctx)) { - av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video\n", + av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video. " + "Valid DV profiles are:\n", avctx->width, avctx->height, av_get_pix_fmt_name(avctx->pix_fmt)); - return -1; + ff_dv_print_profiles(avctx, AV_LOG_ERROR); + return AVERROR(EINVAL); } return ff_dvvideo_init(avctx); -- cgit v1.2.3