mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
Merge commit '0f310a6f33'
* commit '0f310a6f33':
rmdec: Validate the fps value
Conflicts:
libavformat/rmdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
f54d751f33
1 changed files with 8 additions and 3 deletions
|
|
@ -377,11 +377,16 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb,
|
|||
if ((ret = rm_read_extradata(pb, st->codec, codec_data_size - (avio_tell(pb) - codec_pos))) < 0)
|
||||
return ret;
|
||||
|
||||
av_reduce(&st->avg_frame_rate.den, &st->avg_frame_rate.num,
|
||||
0x10000, fps, (1 << 30) - 1);
|
||||
if (fps > 0) {
|
||||
av_reduce(&st->avg_frame_rate.den, &st->avg_frame_rate.num,
|
||||
0x10000, fps, (1 << 30) - 1);
|
||||
#if FF_API_R_FRAME_RATE
|
||||
st->r_frame_rate = st->avg_frame_rate;
|
||||
st->r_frame_rate = st->avg_frame_rate;
|
||||
#endif
|
||||
} else if (s->error_recognition & AV_EF_EXPLODE) {
|
||||
av_log(s, AV_LOG_ERROR, "Invalid framerate\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
|
||||
skip:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue