Skip to content

Commit

Permalink
video: revert, put to another PR
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Mar 29, 2024
1 parent 44a8ec8 commit 8ae145f
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1275,8 +1275,9 @@ int video_update(struct video *v, const char *peer)

if (!sc) {
info("video: video stream is disabled..\n");
video_stop(v);
return 0;
video_stop_source(v);
video_stop_display(v);
return err;
}

if (dir & SDP_SENDONLY)
Expand All @@ -1286,14 +1287,10 @@ int video_update(struct video *v, const char *peer)
err |= video_decoder_set(v, sc->data, sc->pt, sc->rparams);

/* Stop / Start source & display*/
if (dir & SDP_SENDONLY) {
if (dir & SDP_SENDONLY)
err |= video_start_source(v);
stream_enable_tx(v->strm, true);
}
else {
stream_enable_tx(v->strm, false);
else
video_stop_source(v);
}

if (dir == SDP_RECVONLY)
stream_open_natpinhole(v->strm);
Expand All @@ -1302,10 +1299,8 @@ int video_update(struct video *v, const char *peer)

if (dir & SDP_RECVONLY) {
err |= video_start_display(v, peer);
stream_enable_rx(v->strm, true);
}
else {
stream_enable_rx(v->strm, false);
video_stop_display(v);
}

Expand Down

0 comments on commit 8ae145f

Please sign in to comment.