mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
完善代码
This commit is contained in:
parent
e85a8f277e
commit
f222af2632
@ -12,6 +12,7 @@
|
||||
#include <functional>
|
||||
#include <sstream>
|
||||
#include <unordered_map>
|
||||
#include <math.h>
|
||||
#include "jsoncpp/json.h"
|
||||
#include "Util/util.h"
|
||||
#include "Util/logger.h"
|
||||
@ -399,7 +400,7 @@ void installWebApi() {
|
||||
auto video_track = dynamic_pointer_cast<VideoTrack>(track);
|
||||
obj["width"] = video_track->getVideoWidth();
|
||||
obj["height"] = video_track->getVideoHeight();
|
||||
obj["fps"] = (int)video_track->getVideoFps();
|
||||
obj["fps"] = round(video_track->getVideoFps());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -8,6 +8,7 @@
|
||||
* may be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include "MediaSource.h"
|
||||
#include "Record/MP4Reader.h"
|
||||
#include "Util/util.h"
|
||||
@ -312,7 +313,7 @@ void MediaSource::regist() {
|
||||
codec_info << "["
|
||||
<< video_track->getVideoWidth() << "/"
|
||||
<< video_track->getVideoHeight() << "/"
|
||||
<< (int) video_track->getVideoFps() << "] ";
|
||||
<< round(video_track->getVideoFps()) << "] ";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -161,7 +161,7 @@ static inline bool checkTS(const uint8_t *packet, int bytes){
|
||||
}
|
||||
|
||||
void RtpProcess::onRtpSorted(const RtpPacket::Ptr &rtp, int) {
|
||||
if(rtp->sequence != _sequence + 1){
|
||||
if(rtp->sequence != _sequence + 1 && rtp->sequence != 0){
|
||||
WarnP(this) << rtp->sequence << " != " << _sequence << "+1";
|
||||
}
|
||||
_sequence = rtp->sequence;
|
||||
|
Loading…
Reference in New Issue
Block a user