Skip to content

Commit

Permalink
fix memory error settting wfd_video_formats
Browse files Browse the repository at this point in the history
  • Loading branch information
albfan committed Nov 14, 2022
1 parent 788d37d commit 66c86f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ctl/ctl-sink.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,13 @@ static void sink_handle_get_parameter(struct ctl_sink *s,
}
}
if (wfd_video_formats == NULL) {
char video_formats[128];
gchar video_formats[128];
sprintf(video_formats, "00 00 03 10 %08x %08x %08x 00 0000 0000 10 none none",
s->resolutions_cea, s->resolutions_vesa, s->resolutions_hh);
wfd_video_formats = video_formats;
wfd_video_formats = strdup(video_formats);
}
check_and_response_option(WFD_VIDEO_FORMATS, wfd_video_formats);
g_free(wfd_video_formats);

/* wfd_audio_codecs */
gchar* wfd_audio_codecs = "AAC 00000007 00";
Expand Down

0 comments on commit 66c86f2

Please sign in to comment.