On Tue, Apr 12, 2011 at 04:37:55PM +0000, Manjunath Siddaiah wrote:
> 
> On 04/11/2011 10:29 PM, Manjunath Siddaiah wrote:
> > -    if (size < 11) {
> > +    if (!rt->flv_off && size < 11) {
> 
> Why?
> Answer: "rt->flv_off" will never be always zero if there are
> multiple rtmp packets inside one flv packet. rt->flv_off = 0 means
> beginning of a rtmp packet, non-zero means there are some more
> bytes to read from the buffer to form a rtmp packet. Usually for
> lower-bitrates "rt->flv_off" will be zero & contains 1 rtmp packet
> in a flv packet. For video bit-rates more than 1 mbps, flv packet
> consists of more than 1 rtmp packet and also in some cases fractional
> part of a rtmp packet. In such cases next call to this function will
> be having flv_off will be non-zero. That is why there is a null check
> in the beginning.
>
> >          av_log(LOG_CONTEXT, AV_LOG_DEBUG, "FLV packet too small %d\n", 
> > size);
> >          return 0;
> >      }
> > @@ -972,8 +972,10 @@
> >          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 = 0; 
> 
> Why?
> Answer: Making size_temp = 0 when it reads full of buffer size_temp =
> 0, indicating there will be no more bytes to read in the buffer

Luca, ping ...

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to