mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
parent
eb382c3fc9
commit
a17e842da2
@ -436,6 +436,7 @@ FFmpegDecoder::FFmpegDecoder(const Track::Ptr &track, int thread_num, const std:
|
|||||||
av_dict_set(&dict, "zerolatency", "1", 0);
|
av_dict_set(&dict, "zerolatency", "1", 0);
|
||||||
av_dict_set(&dict, "strict", "-2", 0);
|
av_dict_set(&dict, "strict", "-2", 0);
|
||||||
|
|
||||||
|
#ifdef AV_CODEC_CAP_TRUNCATED
|
||||||
if (codec->capabilities & AV_CODEC_CAP_TRUNCATED) {
|
if (codec->capabilities & AV_CODEC_CAP_TRUNCATED) {
|
||||||
/* we do not send complete frames */
|
/* we do not send complete frames */
|
||||||
_context->flags |= AV_CODEC_FLAG_TRUNCATED;
|
_context->flags |= AV_CODEC_FLAG_TRUNCATED;
|
||||||
@ -443,6 +444,7 @@ FFmpegDecoder::FFmpegDecoder(const Track::Ptr &track, int thread_num, const std:
|
|||||||
// 此时业务层应该需要合帧
|
// 此时业务层应该需要合帧
|
||||||
_do_merger = true;
|
_do_merger = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int ret = avcodec_open2(_context.get(), codec, &dict);
|
int ret = avcodec_open2(_context.get(), codec, &dict);
|
||||||
av_dict_free(&dict);
|
av_dict_free(&dict);
|
||||||
|
Loading…
Reference in New Issue
Block a user