Commit a2a9e4ee authored by Josh Allmann's avatar Josh Allmann Committed by Martin Storsjö

rtmp: Plug leak if sending bytes read report fails.

Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 85e10c0a
...@@ -2396,8 +2396,10 @@ static int get_packet(URLContext *s, int for_header) ...@@ -2396,8 +2396,10 @@ static int get_packet(URLContext *s, int for_header)
rt->bytes_read += ret; rt->bytes_read += ret;
if (rt->bytes_read - rt->last_bytes_read > rt->receive_report_size) { if (rt->bytes_read - rt->last_bytes_read > rt->receive_report_size) {
av_log(s, AV_LOG_DEBUG, "Sending bytes read report\n"); av_log(s, AV_LOG_DEBUG, "Sending bytes read report\n");
if ((ret = gen_bytes_read(s, rt, rpkt.timestamp + 1)) < 0) if ((ret = gen_bytes_read(s, rt, rpkt.timestamp + 1)) < 0) {
ff_rtmp_packet_destroy(&rpkt);
return ret; return ret;
}
rt->last_bytes_read = rt->bytes_read; rt->last_bytes_read = rt->bytes_read;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment