summaryrefslogtreecommitdiff
path: root/libavformat/ffmdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-12-03 00:52:56 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-12-03 14:05:15 +0100
commit418a2b247818121b33efd754b626731c87881ed6 (patch)
treee071bd8079dab47d5920a0d0b9e69fd4c64aa688 /libavformat/ffmdec.c
parente706e2e775730db5dfa9103628cd70704dd13cef (diff)
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: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/ffmdec.c')
-rw-r--r--libavformat/ffmdec.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index c76c3e5276..9003ec3d15 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -364,8 +364,8 @@ static int ffm2_read_header(AVFormatContext *s)
goto fail;
}
codec->flags = avio_rb32(pb);
- codec->flags2 = avio_rb32(pb);
- codec->debug = avio_rb32(pb);
+ avio_rb32(pb); // flags2
+ avio_rb32(pb); // debug
if (codec->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
int size = avio_rb32(pb);
if (size < 0 || size >= FF_MAX_EXTRADATA_SIZE) {
@@ -385,14 +385,8 @@ static int ffm2_read_header(AVFormatContext *s)
ret = AVERROR(EINVAL);
goto fail;
}
- codec->time_base.num = avio_rb32(pb);
- codec->time_base.den = avio_rb32(pb);
- 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;
- }
+ avio_rb32(pb); // time_base.num
+ avio_rb32(pb); // time_base.den
codecpar->width = avio_rb16(pb);
codecpar->height = avio_rb16(pb);
ret = av_image_check_size(codecpar->width, codecpar->height, 0, s);
@@ -598,18 +592,13 @@ static int ffm_read_header(AVFormatContext *s)
goto fail;
}
codec->flags = avio_rb32(pb);
- codec->flags2 = avio_rb32(pb);
- codec->debug = avio_rb32(pb);
+ avio_rb32(pb); // flags2
+ avio_rb32(pb); // debug
/* specific info */
switch(codecpar->codec_type) {
case AVMEDIA_TYPE_VIDEO:
- codec->time_base.num = avio_rb32(pb);
- codec->time_base.den = avio_rb32(pb);
- 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;
- }
+ avio_rb32(pb); // time_base.num
+ avio_rb32(pb); // time_base.den
codecpar->width = avio_rb16(pb);
codecpar->height = avio_rb16(pb);
if (av_image_check_size(codecpar->width, codecpar->height, 0, s) < 0)