Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DVB fixes (slow hardware, VDR channels.conf) #6835

Merged
merged 2 commits into from
Sep 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions stream/stream_dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,14 @@ static dvb_channels_list_t *dvb_get_channels(struct mp_log *log,
mod[0] = '\0';
// It's a VDR-style config line.
parse_vdr_par_string(vdr_par_str, ptr);
// Units in VDR-style config files are divided by 1000.
ptr->freq *= 1000UL;
ptr->srate *= 1000UL;
// Frequency in VDR-style config files is in MHz for DVB-S,
// and may be in MHz, kHz or Hz for DVB-C and DVB-T.
// General rule to get useful units is to multiply by 1000 until value is larger than 1000000.
while (ptr->freq < 1000000UL) {
ptr->freq *= 1000UL;
}
// Symbol rate in VDR-style config files is divided by 1000.
ptr->srate *= 1000UL;
switch (delsys) {
case SYS_DVBT:
case SYS_DVBT2:
Expand Down Expand Up @@ -742,7 +747,7 @@ static int dvb_streaming_read(stream_t *stream, char *buffer, int size)
tries --;
pfds[0].fd = fd;
pfds[0].events = POLLIN | POLLPRI;
if (poll(pfds, 1, 500) <= 0) {
if (poll(pfds, 1, 2000) <= 0) {
MP_ERR(stream, "dvb_streaming_read, failed with "
"errno %d when reading %d bytes\n", errno, size - pos);
errno = 0;
Expand Down