[FFmpeg-devel] fix a bug for mmsh because the packet len is too large
zhentan feng
spyfeng
Wed Aug 25 17:52:25 CEST 2010
Hi
On Tue, Aug 24, 2010 at 11:55 PM, Ronald S. Bultje <rsbultje at gmail.com>wrote:
> Hi,
>
> On Tue, Aug 24, 2010 at 11:44 AM, zhentan feng <spyfeng at gmail.com> wrote:
> > the patch fix a bug because the link below is failed (reported by Tamas
> > Selmeci)
> > mmsh://
> >
> a1635.v24937.c2493.g.vm.akamaistream.net/7/1635/2493/v0001/premrad.download.akamai.com/2493/premiere_rock_report/Country_Report.wma
> >
> > according to the spec, the largest packet length is 65535.
> > so we change the receive buffer size.
> [..]
> > --- libavformat/mmsh.c (revision 24901)
> > +++ libavformat/mmsh.c (working copy)
> > @@ -214,7 +214,7 @@
> > {
> > int i, port, err;
> > char httpname[256], path[256], host[128], location[1024];
> > - char *stream_selection;
> > + char *stream_selection = NULL;
> > char headers[1024];
> > MMSHContext *mmsh;
>
> Unrelated and unecessary (not used before being allocated just below).
>
>
see the new patch 1 and 2.
I think this is more safe.
fix the segment fault error with the test link in last mail.
> --- libavformat/mms.h (revision 24901)
> > +++ libavformat/mms.h (working copy)
> > @@ -39,7 +39,7 @@
> >
> > /** Buffer for incoming packets. */
> > /*@{*/
> > - uint8_t in_buffer[8192]; ///< Buffer for incoming
> packets.
> > + uint8_t in_buffer[65535]; ///< Buffer for incoming
> packets.
>
> Big... Can we keep the original size and get the packet contents in
> multiple chunks from the TCP layer?
>
> could you explain this further?
zhentan
--
Best wishes~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1_fix_seg.patch
Type: application/octet-stream
Size: 1345 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100825/f828764c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2_indent.patch
Type: application/octet-stream
Size: 3938 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100825/f828764c/attachment-0001.obj>
More information about the ffmpeg-devel
mailing list