fftools/ffmpeg: move decoder existence check to a more appropriate place

This commit is contained in:
Anton Khirnov
2024-01-11 12:19:37 +01:00
parent 217b8757db
commit b2a0a2e6f5
2 changed files with 7 additions and 7 deletions

View File

@ -898,13 +898,6 @@ int dec_open(InputStream *ist, Scheduler *sch, unsigned sch_idx,
const AVCodec *codec = ist->dec;
int ret;
if (!codec) {
av_log(ist, AV_LOG_ERROR,
"Decoding requested, but no decoder found for: %s\n",
avcodec_get_name(ist->par->codec_id));
return AVERROR(EINVAL);
}
ret = dec_alloc(&ist->decoder);
if (ret < 0)
return ret;