From 88f9ee792debade92fd233ec3511d34e9f02ca71 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 23 Nov 2017 09:29:40 +0100 Subject: [PATCH] fix max apids Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/d19962826207ccad965d2f67f5a6a3690e0c9357 Author: Jacek Jendrzej Date: 2017-11-23 (Thu, 23 Nov 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/playback_gst.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libarmbox/playback_gst.cpp b/libarmbox/playback_gst.cpp index 4773145..d5f6db9 100644 --- a/libarmbox/playback_gst.cpp +++ b/libarmbox/playback_gst.cpp @@ -77,7 +77,7 @@ pthread_mutex_t mutex_tag_ist; static int end_eof = 0; #define HTTP_TIMEOUT 30 // taken from record.h -#define REC_MAX_APIDS 20 +#define REC_MAX_APIDS 10 int real_apids[REC_MAX_APIDS]; gint match_sinktype(const GValue *velement, const gchar *type) @@ -906,6 +906,9 @@ void cPlayback::FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *nu { lt_info( "%s:%s\n", FILENAME, __FUNCTION__); + language->clear(); + *numpida = 0; + if(m_gst_playbin) { gint i, n_audio = 0; @@ -917,9 +920,7 @@ void cPlayback::FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *nu if(n_audio == 0) return; - language->clear(); - - for (i = 0; i < n_audio && i < *numpida; i++) + for (i = 0; i < n_audio && i < REC_MAX_APIDS; i++) { // apids apids[i]= real_apids[i] ? real_apids[i] : i;