You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Report "unknown codec" instead of "unspecifed size" if the codec is unknown.
This commit is contained in:
@@ -2644,6 +2644,9 @@ static int has_codec_parameters(AVStream *st, const char **errmsg_ptr)
|
|||||||
return 0; \
|
return 0; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
if ( avctx->codec_id == AV_CODEC_ID_NONE
|
||||||
|
&& avctx->codec_type != AVMEDIA_TYPE_DATA)
|
||||||
|
FAIL("unknown codec");
|
||||||
switch (avctx->codec_type) {
|
switch (avctx->codec_type) {
|
||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
if (!avctx->frame_size && determinable_frame_size(avctx))
|
if (!avctx->frame_size && determinable_frame_size(avctx))
|
||||||
@@ -2675,8 +2678,6 @@ static int has_codec_parameters(AVStream *st, const char **errmsg_ptr)
|
|||||||
if (avctx->codec_id == AV_CODEC_ID_NONE) return 1;
|
if (avctx->codec_id == AV_CODEC_ID_NONE) return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avctx->codec_id == AV_CODEC_ID_NONE)
|
|
||||||
FAIL("unknown codec");
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user