From 1ea5d767525c6d1f7c82ff6207567bd49968eb6a Mon Sep 17 00:00:00 2001 From: BPanther Date: Sat, 19 Jul 2025 09:44:52 +0200 Subject: [PATCH] small fix Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/51a3d93e27054b59d88bdc7674ec59ae572a17ec Author: BPanther Date: 2025-07-19 (Sat, 19 Jul 2025) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libeplayer3/container/container_ffmpeg.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libeplayer3/container/container_ffmpeg.c b/libeplayer3/container/container_ffmpeg.c index d38ca34..ccf375d 100644 --- a/libeplayer3/container/container_ffmpeg.c +++ b/libeplayer3/container/container_ffmpeg.c @@ -2868,9 +2868,10 @@ static int32_t container_ffmpeg_stop(Context_t *context) uint32_t i = 0; for (i = 0; i < IPTV_AV_CONTEXT_MAX_NUM; i += 1) { - if (NULL != avContextTab[i]) + if (avContextTab[i] != NULL) { - if (0 != use_custom_io[i]) +#ifdef USE_CUSTOM_IO + if (use_custom_io[i] != 0) { /* * Free custom IO independently to avoid segfault/bus error @@ -2891,6 +2892,10 @@ static int32_t container_ffmpeg_stop(Context_t *context) av_freep(&(avContextTab[i]->pb)); use_custom_io[i] = 0; } +#else + av_freep(&(avContextTab[i]->pb->buffer)); + av_freep(&(avContextTab[i]->pb)); +#endif avformat_close_input(&avContextTab[i]); avContextTab[i] = NULL; }