History

lavc/vaapi_encode_mpeg2: fix frame rate calc error when use time_base.

fix frame rate calc error when use time_base.

Jun Zhao committed 9 years ago

Commit a918f161 parent 7a6bd541 file · +1 −1Browse files

Showing the changes to libavcodec/vaapi_encode_mpeg2.c (1 of 1 file). Show all

Unified · Split

libavcodec/vaapi_encode_mpeg2.c+1−1
@@ -208,7 +208,7 @@ static int vaapi_encode_mpeg2_init_sequence_params(AVCodecContext *avctx) · 207 unmodified lines
208 if (avctx->framerate.num > 0 && avctx->framerate.den > 0)208 if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
209 vseq->frame_rate = (float)avctx->framerate.num / avctx->framerate.den;209 vseq->frame_rate = (float)avctx->framerate.num / avctx->framerate.den;
210 else210 else
211 vseq->frame_rate = (float)avctx->time_base.num / avctx->time_base.den;211 vseq->frame_rate = (float)avctx->time_base.den / avctx->time_base.num;
212 212
213 vseq->aspect_ratio_information = 1;213 vseq->aspect_ratio_information = 1;
214 vseq->vbv_buffer_size = avctx->rc_buffer_size / (16 * 1024);214 vseq->vbv_buffer_size = avctx->rc_buffer_size / (16 * 1024);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t