Skip to content

Commit

Permalink
avformat/mvdec: explicitly set duration
Browse files Browse the repository at this point in the history
Resolves a warning that duration is being innaccurately estimated based
on bitrate.

Signed-off-by: John-Paul Stewart <[email protected]>
Reviewed-by: Peter Ross <[email protected]>
  • Loading branch information
John-Paul Stewart authored and rouseabout committed Dec 21, 2021
1 parent 3c9ffbd commit 50bfd5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavformat/mvdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ static int mv_read_header(AVFormatContext *avctx)
avio_skip(pb, 4);
vst->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
vst->avg_frame_rate = fps;
vst->nb_frames = avio_rb32(pb);
vst->duration = vst->nb_frames = avio_rb32(pb);
v = avio_rb32(pb);
switch (v) {
case 1:
Expand Down

0 comments on commit 50bfd5e

Please sign in to comment.