mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-10-31 12:36:41 +08:00 
			
		
		
		
	avformat/rmenc: Check framerate before storing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
		| @@ -253,6 +253,12 @@ static int rv10_write_header(AVFormatContext *ctx, | |||||||
|                 ffio_wfourcc(s,"RV20"); |                 ffio_wfourcc(s,"RV20"); | ||||||
|             avio_wb16(s, stream->par->width); |             avio_wb16(s, stream->par->width); | ||||||
|             avio_wb16(s, stream->par->height); |             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_wb16(s, stream->frame_rate.num / stream->frame_rate.den); /* frames per seconds ? */ | ||||||
|             avio_wb32(s,0);     /* unknown meaning */ |             avio_wb32(s,0);     /* unknown meaning */ | ||||||
|             avio_wb16(s, stream->frame_rate.num / stream->frame_rate.den);  /* unknown meaning */ |             avio_wb16(s, stream->frame_rate.num / stream->frame_rate.den);  /* unknown meaning */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Michael Niedermayer
					Michael Niedermayer