Skip to content

Commit

Permalink
vcap/rtsp: do not advertise size= opt
Browse files Browse the repository at this point in the history
The opt is actually not used - the given size is always overwritten by
the value from NAL.
  • Loading branch information
MartinPulec committed Jul 15, 2024
1 parent 5d4ba79 commit 91bf978
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/video_capture/rtsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ struct rtsp_state {
static void
show_help() {
printf("[rtsp] usage:\n");
printf("\t-t rtsp:<uri>[:rtp_rx_port=<port>][:decompress][size=<width>x<height>]\n");
printf("\t-t rtsp:<uri>[:rtp_rx_port=<port>][:decompress]\n");
printf("\t\t <uri> - RTSP server URI\n");
printf("\t\t <port> - receiver port number \n");
printf(
Expand Down Expand Up @@ -515,8 +515,6 @@ vidcap_rtsp_init(struct vidcap_params *params, void **state) {
strcpy(s->uri, "rtsp://");

s->vrtsp_state.desc.tile_count = 1;
s->vrtsp_state.desc.width = DEFAULT_VIDEO_FRAME_WIDTH/2;
s->vrtsp_state.desc.height = DEFAULT_VIDEO_FRAME_HEIGHT/2;

bool in_uri = true;
while ((item = strtok_r(fmt, ":", &save_ptr))) {
Expand All @@ -527,10 +525,8 @@ vidcap_rtsp_init(struct vidcap_params *params, void **state) {
} else if (strcmp(item, "decompress") == 0) {
s->vrtsp_state.decompress = TRUE;
} else if (strstr(item, "size=")) {
assert(strchr(item, 'x') != NULL);
item = strchr(item, '=') + 1;
s->vrtsp_state.desc.width = atoi(item);
s->vrtsp_state.desc.height = atoi(strchr(item, 'x') + 1);
MSG(WARNING, "size= parameter is not used! Will be removed in "
"future!\n");
} else {
option_given = false;
if (in_uri) {
Expand Down

0 comments on commit 91bf978

Please sign in to comment.