diff options
author | wm4 <nfxjfg@googlemail.com> | 2017-05-24 16:46:39 +0300 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2017-05-31 13:06:51 +0300 |
commit | 01602303821768013253749959f1367fa710f27d (patch) | |
tree | f7080ddde9d909642d7ebd896c00903f70dd5336 /libavcodec/videotoolbox.c | |
parent | edf686f089d68092c3b17a23cc48667665b5a069 (diff) |
videotoolbox: log errors
With the new decode API, you can't handle errors directly in the API
user - you only know that the hwaccel did not initialize at all.
Add some approximate logging.
Diffstat (limited to 'libavcodec/videotoolbox.c')
-rw-r--r-- | libavcodec/videotoolbox.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index d36a33efcd..1b1be41934 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -648,15 +648,21 @@ static int videotoolbox_default_init(AVCodecContext *avctx) switch (status) { case kVTVideoDecoderNotAvailableNowErr: + av_log(avctx, AV_LOG_VERBOSE, "VideoToolbox session not available.\n"); + return AVERROR(ENOSYS); case kVTVideoDecoderUnsupportedDataFormatErr: + av_log(avctx, AV_LOG_VERBOSE, "VideoToolbox does not support this format.\n"); return AVERROR(ENOSYS); case kVTVideoDecoderMalfunctionErr: + av_log(avctx, AV_LOG_VERBOSE, "VideoToolbox malfunction.\n"); return AVERROR(EINVAL); case kVTVideoDecoderBadDataErr : + av_log(avctx, AV_LOG_VERBOSE, "VideoToolbox reported invalid data.\n"); return AVERROR_INVALIDDATA; case 0: return 0; default: + av_log(avctx, AV_LOG_VERBOSE, "Unknown VideoToolbox session creation error %u\n", (unsigned)status); return AVERROR_UNKNOWN; } } |