[vlc-commits] vout: spu: don't return empty arrays

Thomas Guillem git at videolan.org
Fri Mar 5 14:55:18 UTC 2021


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan 28 11:32:06 2021 +0100| [0090bfdc2647ae2a4f003617ab5c411c17ce7db7] | committer: Thomas Guillem

vout: spu: don't return empty arrays

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0090bfdc2647ae2a4f003617ab5c411c17ce7db7
---

 src/video_output/vout_subpictures.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index f60c6f5797..a2e9072dab 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -780,6 +780,11 @@ spu_SelectSubpictures(spu_t *spu, vlc_tick_t system_now,
     }
 
     sys->last_sort_date = render_subtitle_date;
+    if (*subpicture_count == 0)
+    {
+        free(subpicture_array);
+        subpicture_array = NULL;
+    }
     return subpicture_array;
 }
 



More information about the vlc-commits mailing list