From acbad880cbbe204c28f69b08bafbe830a7b34089 Mon Sep 17 00:00:00 2001 From: BPanther Date: Mon, 8 Feb 2021 03:12:42 +0100 Subject: [PATCH] fix record audio, thx TangoCash Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/8e7512455bca86e0066a88474bdef5e1feeacb63 Author: BPanther Date: 2021-02-08 (Mon, 08 Feb 2021) --- src/driver/record.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 38e3ea90f..d41205553 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -415,7 +415,7 @@ bool CRecordInstance::Update() audio_pids.AudioPid = allpids.APIDs[i].pid; audio_pids.AudioPidName = allpids.APIDs[i].desc; - audio_pids.atype = allpids.APIDs[i].is_ac3 ? 1 : allpids.APIDs[i].is_aac ? 5 : allpids.APIDs[i].is_eac3 ? 7 : 0; + audio_pids.atype = allpids.APIDs[i].is_ac3 ? CZapitAudioChannel::AC3 : allpids.APIDs[i].is_aac ? CZapitAudioChannel::AAC : allpids.APIDs[i].is_eac3 ? CZapitAudioChannel::EAC3 : CZapitAudioChannel::MPEG; audio_pids.selected = 0; recMovieInfo->audioPids.push_back(audio_pids); } @@ -718,7 +718,7 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis if(allpids.APIDs[i].pid == it->apid) { audio_pids.AudioPid = allpids.APIDs[i].pid; audio_pids.AudioPidName = allpids.APIDs[i].desc; - audio_pids.atype = allpids.APIDs[i].is_ac3 ? 1 : allpids.APIDs[i].is_aac ? 5 : allpids.APIDs[i].is_eac3 ? 7 : 0; + audio_pids.atype = allpids.APIDs[i].is_ac3 ? CZapitAudioChannel::AC3 : allpids.APIDs[i].is_aac ? CZapitAudioChannel::AAC : allpids.APIDs[i].is_eac3 ? CZapitAudioChannel::EAC3 : CZapitAudioChannel::MPEG; audio_pids.selected = (audio_pids.AudioPid == channel->getAudioPid()) ? 1 : 0; recMovieInfo->audioPids.push_back(audio_pids); } @@ -729,7 +729,7 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis int i = 0; audio_pids.AudioPid = allpids.APIDs[i].pid; audio_pids.AudioPidName = allpids.APIDs[i].desc; - audio_pids.atype = allpids.APIDs[i].is_ac3 ? 1 : allpids.APIDs[i].is_aac ? 5 : allpids.APIDs[i].is_eac3 ? 7 : 0; + audio_pids.atype = allpids.APIDs[i].is_ac3 ? CZapitAudioChannel::AC3 : allpids.APIDs[i].is_aac ? CZapitAudioChannel::AAC : allpids.APIDs[i].is_eac3 ? CZapitAudioChannel::EAC3 : CZapitAudioChannel::MPEG; audio_pids.selected = 1; recMovieInfo->audioPids.push_back(audio_pids); } @@ -2133,17 +2133,17 @@ void CStreamRec::FillMovieInfo(CZapitChannel * /*channel*/, APIDList & /*apid_li } switch(codec->codec_id) { case AV_CODEC_ID_AC3: - audio_pids.atype = 1; + audio_pids.atype = CZapitAudioChannel::AC3; break; case AV_CODEC_ID_AAC: - audio_pids.atype = 5; + audio_pids.atype = CZapitAudioChannel::AAC; break; case AV_CODEC_ID_EAC3: - audio_pids.atype = 7; + audio_pids.atype = CZapitAudioChannel::EAC3; break; case AV_CODEC_ID_MP2: default: - audio_pids.atype = 0; + audio_pids.atype = CZapitAudioChannel::MPEG; break; }