mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
playback_libeplayer3.cpp: fix compil warning
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
#include <audio_lib.h>
|
#include <audio_lib.h>
|
||||||
#include <video_lib.h>
|
#include <video_lib.h>
|
||||||
@@ -536,9 +537,12 @@ void cPlayback::FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t
|
|||||||
printf("\t%s - %s\n", TrackList[i], TrackList[i + 1]);
|
printf("\t%s - %s\n", TrackList[i], TrackList[i + 1]);
|
||||||
if (j < max_numpida)
|
if (j < max_numpida)
|
||||||
{
|
{
|
||||||
int _pid;
|
int _pid = 0;
|
||||||
char _lang[strlen(TrackList[i])];
|
std::string _lang ;
|
||||||
if (2 == sscanf(TrackList[i], "%d %s\n", &_pid, _lang))
|
std::istringstream iss(TrackList[i]) ;
|
||||||
|
iss >> _pid;
|
||||||
|
iss >> _lang;
|
||||||
|
if (_pid && !_lang.empty())
|
||||||
{
|
{
|
||||||
apids[j] = _pid;
|
apids[j] = _pid;
|
||||||
// atUnknown, atMPEG, atMP3, atAC3, atDTS, atAAC, atPCM, atOGG, atFLAC
|
// atUnknown, atMPEG, atMP3, atAC3, atDTS, atAAC, atPCM, atOGG, atFLAC
|
||||||
@@ -563,7 +567,7 @@ void cPlayback::FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t
|
|||||||
else
|
else
|
||||||
ac3flags[j] = 0; //todo
|
ac3flags[j] = 0; //todo
|
||||||
std::string _language = "";
|
std::string _language = "";
|
||||||
_language += std::string(_lang);
|
_language += _lang;
|
||||||
_language += " - ";
|
_language += " - ";
|
||||||
_language += "(";
|
_language += "(";
|
||||||
_language += TrackList[i + 1];
|
_language += TrackList[i + 1];
|
||||||
@@ -600,12 +604,15 @@ void cPlayback::FindAllSubtitlePids(int *pids, unsigned int *numpids, std::strin
|
|||||||
printf("\t%s - %s\n", TrackList[i], TrackList[i + 1]);
|
printf("\t%s - %s\n", TrackList[i], TrackList[i + 1]);
|
||||||
if (j < max_numpids)
|
if (j < max_numpids)
|
||||||
{
|
{
|
||||||
int _pid;
|
int _pid = 0;
|
||||||
char _lang[strlen(TrackList[i])];
|
std::string _lang ;
|
||||||
if (2 == sscanf(TrackList[i], "%d %s\n", &_pid, _lang))
|
std::istringstream iss(TrackList[i]) ;
|
||||||
|
iss >> _pid;
|
||||||
|
iss >> _lang;
|
||||||
|
if (_pid && !_lang.empty())
|
||||||
{
|
{
|
||||||
pids[j] = _pid;
|
pids[j] = _pid;
|
||||||
language[j] = std::string(_lang);
|
language[j] = _lang;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(TrackList[i]);
|
free(TrackList[i]);
|
||||||
|
Reference in New Issue
Block a user