mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user