X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Frtmpproto.c;h=b741e421af972a66bf424c730f3992549962eb05;hb=1931761f18cda3756a27087c366270c38160c754;hp=faf2a6f24409c3cbc574fd900b6e337d809b0393;hpb=fa2d28567e3514323c440c4b7935a3d711eded8d;p=ffmpeg diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index faf2a6f2440..b741e421af9 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2431,8 +2431,10 @@ static int get_packet(URLContext *s, int for_header) rt->bytes_read += ret; if (rt->bytes_read - rt->last_bytes_read > rt->receive_report_size) { 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; + } rt->last_bytes_read = rt->bytes_read; }