[FFmpeg-cvslog] r25335 - trunk/libavformat/mms.c

Michael Niedermayer michaelni
Mon Oct 4 23:43:50 CEST 2010


On Mon, Oct 04, 2010 at 09:45:12PM +0200, aurel wrote:
> Author: aurel
> Date: Mon Oct  4 21:45:12 2010
> New Revision: 25335
> 
> Log:
> mms: remove dependency on MAX_STREAM API
> 
> Modified:
>    trunk/libavformat/mms.c
> 
> Modified: trunk/libavformat/mms.c
> ==============================================================================
> --- trunk/libavformat/mms.c	Mon Oct  4 15:41:06 2010	(r25334)
> +++ trunk/libavformat/mms.c	Mon Oct  4 21:45:12 2010	(r25335)
> @@ -24,6 +24,12 @@
>  #include "asf.h"
>  #include "libavutil/intreadwrite.h"
>  
> +#if FF_API_MAX_STREAMS
> +#define MMS_MAX_STREAMS MAX_STREAMS
> +#else
> +#define MMS_MAX_STREAMS 256    /**< arbitrary sanity check value */
> +#endif
> +
>  int ff_mms_read_header(MMSContext *mms, uint8_t *buf, const int size)
>  {
>      char *pos;
> @@ -97,7 +103,7 @@ int ff_mms_asf_header_parser(MMSContext 
>              //The second condition is for checking CS_PKT_STREAM_ID_REQUEST packet size,
>              //we can calcuate the packet size by stream_num.
>              //Please see function send_stream_selection_request().
> -            if (mms->stream_num < MAX_STREAMS &&
> +            if (mms->stream_num < MMS_MAX_STREAMS &&
>                      46 + mms->stream_num * 6 < sizeof(mms->out_buffer)) {

these 2 tests can be merged if one cannot be droped

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

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20101004/fdc61d9d/attachment.pgp>



More information about the ffmpeg-cvslog mailing list