Commit 418a2b24 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/ffmdec: Drop flags2, debug and codec->time_base setting

It should still be possible to set these through recommended_encoder_configuration
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent e706e2e7
...@@ -364,8 +364,8 @@ static int ffm2_read_header(AVFormatContext *s) ...@@ -364,8 +364,8 @@ static int ffm2_read_header(AVFormatContext *s)
goto fail; goto fail;
} }
codec->flags = avio_rb32(pb); codec->flags = avio_rb32(pb);
codec->flags2 = avio_rb32(pb); avio_rb32(pb); // flags2
codec->debug = avio_rb32(pb); avio_rb32(pb); // debug
if (codec->flags & AV_CODEC_FLAG_GLOBAL_HEADER) { if (codec->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
int size = avio_rb32(pb); int size = avio_rb32(pb);
if (size < 0 || size >= FF_MAX_EXTRADATA_SIZE) { if (size < 0 || size >= FF_MAX_EXTRADATA_SIZE) {
...@@ -385,14 +385,8 @@ static int ffm2_read_header(AVFormatContext *s) ...@@ -385,14 +385,8 @@ static int ffm2_read_header(AVFormatContext *s)
ret = AVERROR(EINVAL); ret = AVERROR(EINVAL);
goto fail; goto fail;
} }
codec->time_base.num = avio_rb32(pb); avio_rb32(pb); // time_base.num
codec->time_base.den = avio_rb32(pb); avio_rb32(pb); // time_base.den
if (codec->time_base.num <= 0 || codec->time_base.den <= 0) {
av_log(s, AV_LOG_ERROR, "Invalid time base %d/%d\n",
codec->time_base.num, codec->time_base.den);
ret = AVERROR_INVALIDDATA;
goto fail;
}
codecpar->width = avio_rb16(pb); codecpar->width = avio_rb16(pb);
codecpar->height = avio_rb16(pb); codecpar->height = avio_rb16(pb);
ret = av_image_check_size(codecpar->width, codecpar->height, 0, s); ret = av_image_check_size(codecpar->width, codecpar->height, 0, s);
...@@ -598,18 +592,13 @@ static int ffm_read_header(AVFormatContext *s) ...@@ -598,18 +592,13 @@ static int ffm_read_header(AVFormatContext *s)
goto fail; goto fail;
} }
codec->flags = avio_rb32(pb); codec->flags = avio_rb32(pb);
codec->flags2 = avio_rb32(pb); avio_rb32(pb); // flags2
codec->debug = avio_rb32(pb); avio_rb32(pb); // debug
/* specific info */ /* specific info */
switch(codecpar->codec_type) { switch(codecpar->codec_type) {
case AVMEDIA_TYPE_VIDEO: case AVMEDIA_TYPE_VIDEO:
codec->time_base.num = avio_rb32(pb); avio_rb32(pb); // time_base.num
codec->time_base.den = avio_rb32(pb); avio_rb32(pb); // time_base.den
if (codec->time_base.num <= 0 || codec->time_base.den <= 0) {
av_log(s, AV_LOG_ERROR, "Invalid time base %d/%d\n",
codec->time_base.num, codec->time_base.den);
goto fail;
}
codecpar->width = avio_rb16(pb); codecpar->width = avio_rb16(pb);
codecpar->height = avio_rb16(pb); codecpar->height = avio_rb16(pb);
if (av_image_check_size(codecpar->width, codecpar->height, 0, s) < 0) if (av_image_check_size(codecpar->width, codecpar->height, 0, s) < 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