diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-27 21:01:06 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-27 23:28:23 +0100 |
commit | 102f7d0ee62e28f7d2595e811b3a649b7383d657 (patch) | |
tree | 63b4d95cb1dbe3f7f8c8227567aa05b5a063e558 /libavformat | |
parent | 5d7be07a8b823238c881889faf0f1093bca1f062 (diff) | |
download | ffmpeg-102f7d0ee62e28f7d2595e811b3a649b7383d657.tar.gz |
avformat/rmenc: Check framerate before storing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rmenc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c index 3708f421bc..97ce711a46 100644 --- a/libavformat/rmenc.c +++ b/libavformat/rmenc.c @@ -253,6 +253,12 @@ static int rv10_write_header(AVFormatContext *ctx, ffio_wfourcc(s,"RV20"); avio_wb16(s, stream->par->width); avio_wb16(s, stream->par->height); + + if (stream->frame_rate.num / stream->frame_rate.den > 65535) { + av_log(s, AV_LOG_ERROR, "Frame rate %d is too high\n", stream->frame_rate.num / stream->frame_rate.den); + return AVERROR(EINVAL); + } + avio_wb16(s, stream->frame_rate.num / stream->frame_rate.den); /* frames per seconds ? */ avio_wb32(s,0); /* unknown meaning */ avio_wb16(s, stream->frame_rate.num / stream->frame_rate.den); /* unknown meaning */ |