Skip to content

Commit

Permalink
use correct context initialization function
Browse files Browse the repository at this point in the history
  • Loading branch information
bsobhani committed Apr 1, 2024
1 parent 9415425 commit 81a8aa7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions supportApp/videoCompressionSrc/streaming_vc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 81a8aa7

Please sign in to comment.