From 1e6005d609366c39ef702d3d3fbf7c8bb3052c70 Mon Sep 17 00:00:00 2001 From: Leon <8544842+leon14631@user.noreply.gitee.com> Date: Mon, 8 Aug 2022 10:08:15 +0000 Subject: [PATCH] update src/Extension/H265.cpp. --- src/Extension/H265.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Extension/H265.cpp b/src/Extension/H265.cpp index 8877371d..6c610c96 100644 --- a/src/Extension/H265.cpp +++ b/src/Extension/H265.cpp @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved. * * This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit). @@ -88,6 +88,17 @@ float H265Track::getVideoFps() const { return _fps; } +void H265Track::flush() { + int w = 0; + int h = 0; + float fps = 0.0; + if(getHEVCInfo(_vps,_sps, w, h, fps)){ + _width = w; + _height = h; + _fps = fps; + } +} + bool H265Track::ready() { return !_vps.empty() && !_sps.empty() && !_pps.empty(); }