avformat/pdvenc: Remove always-false checks

The number of streams is always one (namely one video stream
with codec id AV_CODEC_ID_PDV) due to the MAX_ONE_OF_EACH,
ONLY_DEFAULT_CODECS flags. Also, the generic code (init_muxer()
in mux.c) checks that video streams have proper dimensions set.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2026-04-16 16:51:59 +02:00
parent 6135ccbf80
commit 2b8438a495

View File

@@ -80,17 +80,8 @@ static int pdv_write_header(AVFormatContext *s)
return AVERROR(EINVAL);
}
if (s->nb_streams != 1) {
av_log(s, AV_LOG_ERROR, "PDV muxer supports exactly one stream.\n");
return AVERROR(EINVAL);
}
st = s->streams[0];
if (st->codecpar->width <= 0 || st->codecpar->height <= 0) {
av_log(s, AV_LOG_ERROR, "Invalid output dimensions.\n");
return AVERROR(EINVAL);
}
if (st->codecpar->width > UINT16_MAX || st->codecpar->height > UINT16_MAX) {
av_log(s, AV_LOG_ERROR, "Output dimensions exceed PDV limits.\n");
return AVERROR(EINVAL);