Skip to content

Commit

Permalink
Merge pull request #2325 from SamyCookie/patch-1
Browse files Browse the repository at this point in the history
Bugfix: make audio/video recording in videocall working again
  • Loading branch information
atoppi committed Aug 26, 2020
2 parents bdf58d9 + 633b815 commit 11c5d78
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plugins/janus_videocall.c
Original file line number Diff line number Diff line change
Expand Up @@ -1557,8 +1557,8 @@ static void *janus_videocall_handler(void *data) {
if(recording_base) {
/* Use the filename and path we have been provided */
g_snprintf(filename, 255, "%s-audio", recording_base);
session->arc = janus_recorder_create(NULL, janus_audiocodec_name(session->acodec), filename);
if(session->arc == NULL) {
rc = janus_recorder_create(NULL, janus_audiocodec_name(session->acodec), filename);
if(rc == NULL) {
/* FIXME We should notify the fact the recorder could not be created */
JANUS_LOG(LOG_ERR, "Couldn't open an audio recording file for this VideoCall user!\n");
}
Expand All @@ -1568,8 +1568,8 @@ static void *janus_videocall_handler(void *data) {
session->username ? session->username : "unknown",
(peer && peer->username) ? peer->username : "unknown",
now);
session->arc = janus_recorder_create(NULL, janus_audiocodec_name(session->acodec), filename);
if(session->arc == NULL) {
rc = janus_recorder_create(NULL, janus_audiocodec_name(session->acodec), filename);
if(rc == NULL) {
/* FIXME We should notify the fact the recorder could not be created */
JANUS_LOG(LOG_ERR, "Couldn't open an audio recording file for this VideoCall user!\n");
}
Expand All @@ -1586,8 +1586,8 @@ static void *janus_videocall_handler(void *data) {
if(recording_base) {
/* Use the filename and path we have been provided */
g_snprintf(filename, 255, "%s-video", recording_base);
session->vrc = janus_recorder_create(NULL, janus_videocodec_name(session->vcodec), filename);
if(session->vrc == NULL) {
rc = janus_recorder_create(NULL, janus_videocodec_name(session->vcodec), filename);
if(rc == NULL) {
/* FIXME We should notify the fact the recorder could not be created */
JANUS_LOG(LOG_ERR, "Couldn't open an video recording file for this VideoCall user!\n");
}
Expand All @@ -1597,8 +1597,8 @@ static void *janus_videocall_handler(void *data) {
session->username ? session->username : "unknown",
(peer && peer->username) ? peer->username : "unknown",
now);
session->vrc = janus_recorder_create(NULL, janus_videocodec_name(session->vcodec), filename);
if(session->vrc == NULL) {
rc = janus_recorder_create(NULL, janus_videocodec_name(session->vcodec), filename);
if(rc == NULL) {
/* FIXME We should notify the fact the recorder could not be created */
JANUS_LOG(LOG_ERR, "Couldn't open an video recording file for this VideoCall user!\n");
}
Expand Down

0 comments on commit 11c5d78

Please sign in to comment.