Commit dad42bc5 authored by Aman Gupta's avatar Aman Gupta

avcodec/h264, videotoolbox: return AVERROR_INVALIDDATA when no frames are produced

The only reason videotoolbox wouldn't produce frames is if the data fed
to it was invalid, so returning AVERROR_INVALIDDATA makes sense here.

Further, it means AVERROR_EXTERNAL can be used in further commits to signal
fatal VideoToolbox errors, letting the user know that they need to fallback to
another decoder.
Signed-off-by: 's avatarAman Gupta <aman@tmm1.net>
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 6515e283
......@@ -824,7 +824,7 @@ static int output_frame(H264Context *h, AVFrame *dst, H264Picture *srcp)
int ret;
if (src->format == AV_PIX_FMT_VIDEOTOOLBOX && src->buf[0]->size == 1)
return AVERROR_EXTERNAL;
return AVERROR_INVALIDDATA;
ret = av_frame_ref(dst, src);
if (ret < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment