[FFmpeg-devel] [PATCH] rtmp-output

Diego Biurrun diego
Mon Nov 30 20:46:01 CET 2009


On Mon, Nov 30, 2009 at 06:18:18PM +0200, Sergiy wrote:
> This patch implements rtmp-output for libavformat.
> It was tested with red5/wowza/fms.
> 
> --- a/libavformat/rtmppkt.c
> +++ b/libavformat/rtmppkt.c
> @@ -111,6 +111,13 @@ int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p,
> +    //extract ts extension
> +    if(timestamp == 0xffffff) {
> +        if (url_read_complete(h, buf, 4) != 4)
> +            return AVERROR(EIO);
> +        timestamp = AV_RB32(buf);
> +    }
> +
>      if (ff_rtmp_packet_create(p, channel_id, type, timestamp, data_size))
>          return -1;

Please respect the surrounding (K&R) style and be consistent, you mix
styles even in the code you add: Place spaces after if/for/while/switch.

> --- a/libavformat/rtmpproto.c
> +++ b/libavformat/rtmpproto.c
> @@ -94,42 +98,53 @@ static const uint8_t rtmp_server_key[] = {
> +
> +    if (rt->is_input){

.. and space before {




More information about the ffmpeg-devel mailing list