[FFmpeg-devel] [PATCH] rtmpproto.c: Fixed RTMP Stream output issue

Michael Niedermayer michaelni at gmx.at
Tue Sep 6 22:35:29 CEST 2011


Hi Chiru

On Thu, Sep 01, 2011 at 07:18:09PM +0000, Chiranjeevi Melam wrote:
> Hi ,
> Attached is the patch for an RTMP stream output issue.
> "Original code had the assumption of only one FLV packet per RTMP packet. But that assumption is incorrect for higher bit rates. Made changes to the code to accommodate more than one FLV packet per RTMP packet."
> Thanks,
> Chiru

Content-Description: rtmp.patch
>  rtmpproto.c |   10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> a348e6a9db635b9c59308640ec0a48757f981774  rtmp.patch
> diff --git a/ffmpeg_base/libavformat/rtmpproto.c b/ffmpeg/libavformat/rtmpproto.c
> old mode 100644
> new mode 100755
> index e3fce2e..7bf7c90
> --- a/ffmpeg_base/libavformat/rtmpproto.c
> +++ b/ffmpeg/libavformat/rtmpproto.c
> @@ -925,7 +925,7 @@ static int rtmp_write(URLContext *s, const uint8_t *buf, int size)
>      uint32_t ts;
>      const uint8_t *buf_temp = buf;
>  
> -    if (size < 11) {
> +    if (!rt->flv_off && size < 11) {
>          av_log(s, AV_LOG_DEBUG, "FLV packet too small %d\n", size);
>          return 0;
>      }
> @@ -966,20 +966,22 @@ static int rtmp_write(URLContext *s, const uint8_t *buf, int size)
>          if (rt->flv_size - rt->flv_off > size_temp) {
>              bytestream_get_buffer(&buf_temp, rt->flv_data + rt->flv_off, size_temp);
>              rt->flv_off += size_temp;
> +			size_temp -= size_temp; 

tabs are forbidden in git
also x -= x makes no sense, thats x=0

and how can we reproduce the problem this patch fixes ?

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110906/36217a13/attachment.asc>


More information about the ffmpeg-devel mailing list