From 0861b447176343572d6e7d05bb53850a8d414bb1 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Wed, 1 Nov 2017 10:02:38 +0100 Subject: [PATCH] gstreamer: reset pids at start Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/88ce7b707dc6a1916f20eaa11cde07a14fe29440 Author: TangoCash Date: 2017-11-01 (Wed, 01 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, 8 insertions(+), 1 deletion(-) diff --git a/libarmbox/playback_gst.cpp b/libarmbox/playback_gst.cpp index bc9f0b2..71275f3 100644 --- a/libarmbox/playback_gst.cpp +++ b/libarmbox/playback_gst.cpp @@ -87,11 +87,16 @@ gint match_sinktype(const GValue *velement, const gchar *type) return strcmp(g_type_name(G_OBJECT_TYPE(element)), type); } -void processMpegTsSection(GstMpegtsSection* section) +void resetPids() { for (unsigned int i = 0; i < REC_MAX_APIDS; i++) { real_apids[i] = 0; } +} + +void processMpegTsSection(GstMpegtsSection* section) +{ + resetPids(); int cnt = 0; if (section->section_type == GST_MPEGTS_SECTION_PMT) { const GstMpegtsPMT* pmt = gst_mpegts_section_get_pmt(section); @@ -513,6 +518,8 @@ bool cPlayback::Start(char *filename, int /*vpid*/, int /*vtype*/, int /*apid*/, else extra_headers.clear(); + resetPids(); + mAudioStream = 0; init_jump = -1;