mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 00:40:25 +00:00
vcap/file: set FPS from avg_frame_rate
The [file] (URL few commits below) has actually set r_frame_rate as 1/1200k, which causes the libavcodec JPEG decoder crash (received is something like 1792i due to overflow). avg_frame_rate contains 1/25.
This commit is contained in:
@@ -695,7 +695,8 @@ static bool setup_video(struct vidcap_state_lavf_decoder *s) {
|
||||
AVStream *st = s->fmt_ctx->streams[s->video_stream_idx];
|
||||
s->video_desc.width = st->codecpar->width;
|
||||
s->video_desc.height = st->codecpar->height;
|
||||
s->video_desc.fps = (double)st->r_frame_rate.num / st->r_frame_rate.den;
|
||||
s->video_desc.fps =
|
||||
(double) st->avg_frame_rate.num / st->avg_frame_rate.den;
|
||||
s->video_desc.tile_count = 1;
|
||||
if (s->no_decode) {
|
||||
s->video_desc.color_spec =
|
||||
|
||||
Reference in New Issue
Block a user