ffmpeg: free sframe->data[0], not sframe->data #1712

This commit is contained in:
nick black 2021-06-02 23:54:04 -04:00 committed by Nick Black
parent 36f7eb500c
commit 5f3844d6f1

View File

@ -580,13 +580,13 @@ int ffmpeg_blit(ncvisual* ncv, int rows, int cols, ncplane* n,
if(rgba_blit_dispatch(n, bset, stride, data, rows, cols, bargs) < 0){
//fprintf(stderr, "rgba dispatch failed!\n");
if(sframe){
//av_freep(sframe->data);
av_freep(&sframe->data[0]);
av_freep(&sframe);
}
return -1;
}
if(sframe){
//av_freep(ncv->details->frame->data);
av_freep(&sframe->data[0]);
av_freep(&sframe);
}
return 0;