comparison rtsp.c @ 5569:346dce85a801 libavformat

Pretty embarassing bug; we shouldn't use av_strlcatf() on an uninitialized buffer, that is doomed to not work at some point.
author rbultje
date Thu, 21 Jan 2010 19:48:30 +0000
parents 0a67dbb939a0
children c1843162bd3d
comparison
equal deleted inserted replaced
5568:1cdf9bbfbc7f 5569:346dce85a801
1587 cache[i] = s->streams[i]->discard; 1587 cache[i] = s->streams[i]->discard;
1588 1588
1589 if (!rt->need_subscription) { 1589 if (!rt->need_subscription) {
1590 if (memcmp (cache, rt->real_setup_cache, 1590 if (memcmp (cache, rt->real_setup_cache,
1591 sizeof(enum AVDiscard) * s->nb_streams)) { 1591 sizeof(enum AVDiscard) * s->nb_streams)) {
1592 av_strlcatf(cmd, sizeof(cmd), 1592 snprintf(cmd, sizeof(cmd),
1593 "SET_PARAMETER %s RTSP/1.0\r\n" 1593 "SET_PARAMETER %s RTSP/1.0\r\n"
1594 "Unsubscribe: %s\r\n", 1594 "Unsubscribe: %s\r\n",
1595 s->filename, rt->last_subscription); 1595 s->filename, rt->last_subscription);
1596 rtsp_send_cmd(s, cmd, reply, NULL); 1596 rtsp_send_cmd(s, cmd, reply, NULL);
1597 if (reply->status_code != RTSP_STATUS_OK) 1597 if (reply->status_code != RTSP_STATUS_OK)