We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 418c60e commit a4f84efCopy full SHA for a4f84ef
pens/main/gdpen.c
@@ -66,6 +66,7 @@ static AVCodecContext *codec_ctx = NULL;
66
static AVFrame *mpeg_frame = NULL;
67
#if LIBAVCODEC_VERSION_MAJOR >= 54
68
static AVPacket mpeg_pkt;
69
+static *AVPacket mpeg_pnt = NULL;
70
static int mpeg_gout;
71
#else
72
static int frame_out_size;
@@ -537,7 +538,8 @@ static void ffmpeg_write (void) {
537
538
if (avcodec_encode_video2 (codec_ctx, &mpeg_pkt, mpeg_frame, &mpeg_gout) < 0)
539
ERR (FATAL, name, "MPEG encoding error\n");
540
- mpeg_pkt = av_packet_alloc();
541
+ mpeg_pnt = av_packet_alloc();
542
+ mpeg_pkt = *mpeg_pnt;
543
mpeg_pkt.data = NULL;
544
mpeg_pkt.size = 0;
545
if (avcodec_send_frame(codec_ctx, mpeg_frame) < 0)
0 commit comments