[fix] obu data corrupted after transmission

This commit is contained in:
dijunkun
2024-10-12 17:30:29 +08:00
parent 1407f67d3c
commit 6bda59b1a7
10 changed files with 170 additions and 466 deletions

View File

@@ -2,7 +2,7 @@
#include "log.h"
#define SAVE_RECEIVED_AV1_STREAM 0
#define SAVE_RECEIVED_AV1_STREAM 1
#define SAVE_DECODED_NV12_STREAM 0
#include "libyuv.h"
@@ -98,6 +98,7 @@ int Dav1dAv1Decoder::Init() {
int Dav1dAv1Decoder::Decode(
const uint8_t *data, int size,
std::function<void(VideoFrame)> on_receive_decoded_frame) {
LOG_ERROR("frame size = {}", size);
if (SAVE_RECEIVED_AV1_STREAM) {
fwrite((unsigned char *)data, 1, size, file_av1_);
}

View File

@@ -6,7 +6,7 @@
#include "log.h"
#define SAVE_RECEIVED_NV12_STREAM 0
#define SAVE_ENCODED_AV1_STREAM 0
#define SAVE_ENCODED_AV1_STREAM 1
#define SET_ENCODER_PARAM_OR_RETURN_ERROR(param_id, param_value) \
do { \