From 81a8aa7f3568f5b879fdc65ba7658709cf65b572 Mon Sep 17 00:00:00 2001 From: Alex Sobhani Date: Mon, 1 Apr 2024 01:43:50 -0400 Subject: [PATCH] use correct context initialization function --- supportApp/videoCompressionSrc/streaming_vc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/supportApp/videoCompressionSrc/streaming_vc.c b/supportApp/videoCompressionSrc/streaming_vc.c index 97f0a37..58ba1bd 100644 --- a/supportApp/videoCompressionSrc/streaming_vc.c +++ b/supportApp/videoCompressionSrc/streaming_vc.c @@ -19,11 +19,13 @@ int compress_buffer(CodecContext* c, char* source, int x_size, int y_size, char* int pix_size = 1; int uncompressed_size = pix_size*x_size*y_size; if(c_c==0){ - c_c = init_encoder_context(x_size, y_size); + //c_c = init_encoder_context(x_size, y_size); + c_c = init_av_encoder_context(x_size, y_size); } else if(c_c->width!=x_size || c_c->height!=y_size){ avcodec_close(c_c); - c_c = init_encoder_context(x_size, y_size); + //c_c = init_encoder_context(x_size, y_size); + c_c = init_av_encoder_context(x_size, y_size); } AVPacket* pkt;