[FFmpeg-devel] fix a bug for mmsh because the packet len is too large

Ronald S. Bultje rsbultje
Tue Aug 24 17:55:20 CEST 2010


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).

> --- 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?

Ronald



More information about the ffmpeg-devel mailing list