mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-10-30 16:27:36 +08:00
FFmpegDecoder 默认合并帧,ffmpeg 5以上不支持将不完整的帧送入解码器中,根据 issue #3794 做出修改
This commit is contained in:
parent
4d8b000198
commit
ba1a88f202
@ -439,6 +439,7 @@ FFmpegDecoder::FFmpegDecoder(const Track::Ptr &track, int thread_num, const std:
|
||||
if (codec->capabilities & AV_CODEC_CAP_TRUNCATED) {
|
||||
/* we do not send complete frames */
|
||||
_context->flags |= AV_CODEC_FLAG_TRUNCATED;
|
||||
_do_merger = false;
|
||||
} else {
|
||||
// 此时业务层应该需要合帧
|
||||
_do_merger = true;
|
||||
|
@ -114,7 +114,8 @@ private:
|
||||
bool decodeFrame(const char *data, size_t size, uint64_t dts, uint64_t pts, bool live, bool key_frame);
|
||||
|
||||
private:
|
||||
bool _do_merger = false;
|
||||
// default merge frame
|
||||
bool _do_merger = true;
|
||||
toolkit::Ticker _ticker;
|
||||
onDec _cb;
|
||||
std::shared_ptr<AVCodecContext> _context;
|
||||
|
Loading…
Reference in New Issue
Block a user