Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: Add fallback to the default streaming profile when specified pro…
…file cannot be used, fixes #3062
  • Loading branch information
perexg committed Sep 29, 2015
1 parent 02af180 commit 9329a8b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/dvr/dvr_rec.c
Expand Up @@ -122,8 +122,15 @@ dvr_rec_subscribe(dvr_entry_t *de)
prch = malloc(sizeof(*prch));
profile_chain_init(prch, pro, de->de_channel);
if (profile_chain_open(prch, &de->de_config->dvr_muxcnf, 0, 0)) {
tvherror("dvr", "unable to create new channel streaming chain for '%s'",
channel_get_name(de->de_channel));
profile_chain_close(prch);
tvherror("dvr", "unable to create new channel streaming chain '%s' for '%s', using default",
pro->pro_name, channel_get_name(de->de_channel));
pro = profile_find_by_name(NULL, NULL);
profile_chain_init(prch, pro, de->de_channel);
}
if (profile_chain_open(prch, &de->de_config->dvr_muxcnf, 0, 0)) {
tvherror("dvr", "unable to create channel streaming default chain '%s' for '%s'",
pro->pro_name, channel_get_name(de->de_channel));
profile_chain_close(prch);
free(prch);
return -EINVAL;
Expand All @@ -133,8 +140,8 @@ dvr_rec_subscribe(dvr_entry_t *de)
buf, prch->prch_flags,
NULL, NULL, NULL, NULL);
if (de->de_s == NULL) {
tvherror("dvr", "unable to create new channel subcription for '%s'",
channel_get_name(de->de_channel));
tvherror("dvr", "unable to create new channel subcription for '%s' profile '%s'",
channel_get_name(de->de_channel), pro->pro_name);
profile_chain_close(prch);
free(prch);
return -EINVAL;
Expand Down

0 comments on commit 9329a8b

Please sign in to comment.