You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/libdavs2: use frame rate code table
It's more natural than the floating to fraction conversion. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
#include "libavutil/cpu.h"
|
#include "libavutil/cpu.h"
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "codec_internal.h"
|
#include "codec_internal.h"
|
||||||
|
#include "avs2.h"
|
||||||
#include "davs2.h"
|
#include "davs2.h"
|
||||||
|
|
||||||
typedef struct DAVS2Context {
|
typedef struct DAVS2Context {
|
||||||
@@ -85,7 +86,8 @@ static int davs2_dump_frames(AVCodecContext *avctx, davs2_picture_t *pic, int *g
|
|||||||
*/
|
*/
|
||||||
avctx->has_b_frames = FFMAX(avctx->has_b_frames, !headerset->low_delay);
|
avctx->has_b_frames = FFMAX(avctx->has_b_frames, !headerset->low_delay);
|
||||||
|
|
||||||
avctx->framerate = av_d2q(headerset->frame_rate,4096);
|
if (headerset->frame_rate_id < 16)
|
||||||
|
avctx->framerate = ff_avs2_frame_rate_tab[headerset->frame_rate_id];
|
||||||
*got_frame = 0;
|
*got_frame = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user