From d1cc451037aa2ee322e9ae98772d715c19155755 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 3 Apr 2022 16:28:38 -0400 Subject: [PATCH] packet size should be buffer size, not the size of a pointer... --- src/zm_mpeg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_mpeg.cpp b/src/zm_mpeg.cpp index 275e36628..695fb919c 100644 --- a/src/zm_mpeg.cpp +++ b/src/zm_mpeg.cpp @@ -488,7 +488,7 @@ double VideoStream::ActuallyEncodeFrame( const uint8_t *buffer, int buffer_size, pkt->flags |= AV_PKT_FLAG_KEY; pkt->stream_index = ost->index; pkt->data = (uint8_t *)opicture_ptr; - pkt->size = sizeof (AVPicture); + pkt->size = buffer_size; got_packet = 1; } else { opicture_ptr->pts = codec_context->frame_number;