libspark/playback: don't show program selection dialog if audio or video pid is already selected

This commit is contained in:
martii
2014-08-25 17:42:30 +02:00
parent 9112c4d16d
commit 6c28142914

View File

@@ -82,7 +82,7 @@ bool cPlayback::Start(char *filename, int vpid, int vtype, int apid, int ac3, in
} else {
std::vector<std::string> keys, values;
int selected_program = 0;
if (GetPrograms(keys, values) && (keys.size() > 1) && ProgramSelectionCallback) {
if (!vpid && !apid && GetPrograms(keys, values) && (keys.size() > 1) && ProgramSelectionCallback) {
const char *key = ProgramSelectionCallback(ProgramSelectionCallbackData, keys, values);
if (!key) {
player->Close();