File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -737,21 +737,22 @@ recreate_textures(struct state_sdl3 *s, struct video_desc desc)
737737 struct video_frame_sdl3_data * frame_data =
738738 calloc (1 , sizeof * frame_data );
739739 frame_data -> texture = texture ;
740+ f -> callbacks .dispose_udata = frame_data ;
741+ f -> callbacks .data_deleter = vf_sdl_texture_data_deleter ;
740742 if (s -> cs_data -> convert != NULL ) {
741743 frame_data -> preconv_data = f -> tiles [0 ].data =
742744 malloc (f -> tiles [0 ].data_len );
743745 } else {
744746 SDL_CHECK (SDL_LockTexture (texture , NULL ,
745747 (void * * ) & f -> tiles [0 ].data ,
746748 & s -> texture_pitch ),
749+ vf_free (f );
747750 return false);
748751 if (!codec_is_planar (desc .color_spec )) {
749752 f -> tiles [0 ].data_len =
750753 desc .height * s -> texture_pitch ;
751754 }
752755 }
753- f -> callbacks .dispose_udata = frame_data ;
754- f -> callbacks .data_deleter = vf_sdl_texture_data_deleter ;
755756 simple_linked_list_append (s -> free_frame_queue , f );
756757 }
757758
You can’t perform that action at this time.
0 commit comments