mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
Fix h264 frame size error
This commit is contained in:
@@ -50,6 +50,10 @@ int NvidiaVideoDecoder::Decode(
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (SAVE_DECODER_STREAM) {
|
||||
fwrite((unsigned char *)data, 1, size, file_);
|
||||
}
|
||||
|
||||
if ((*(data + 4) & 0x1f) == 0x07) {
|
||||
// LOG_WARN("Receive key frame");
|
||||
}
|
||||
@@ -67,10 +71,6 @@ int NvidiaVideoDecoder::Decode(
|
||||
data, decoder->GetWidth() * decoder->GetHeight() * 3 / 2,
|
||||
decoder->GetWidth(), decoder->GetHeight());
|
||||
on_receive_decoded_frame(decoded_frame);
|
||||
if (SAVE_DECODER_STREAM) {
|
||||
fwrite((unsigned char *)decoded_frame.Buffer(), 1,
|
||||
decoded_frame.Size(), file_);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,6 +152,10 @@ int OpenH264Decoder::Decode(
|
||||
fwrite((unsigned char *)data, 1, size, h264_stream_);
|
||||
}
|
||||
|
||||
if ((*(data + 4) & 0x1f) == 0x07) {
|
||||
// LOG_WARN("Receive key frame");
|
||||
}
|
||||
|
||||
SBufferInfo sDstBufInfo = {0};
|
||||
memset(&sDstBufInfo, 0, sizeof(SBufferInfo));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user