allocate the array.
Originally committed as revision 24794 to svn://svn.ffmpeg.org/ffmpeg/trunk
//Please see function send_stream_selection_request().
if (mms->stream_num < MAX_STREAMS &&
46 + mms->stream_num * 6 < sizeof(mms->out_buffer)) {
+ mms->streams = av_fast_realloc(mms->streams,
+ &mms->nb_streams_allocated,
+ (mms->stream_num + 1) * sizeof(MMSStream));
mms->streams[mms->stream_num].id = stream_id;
mms->stream_num++;
} else {
typedef struct {
URLContext *mms_hd; ///< TCP connection handle
- MMSStream streams[MAX_STREAMS];
+ MMSStream *streams;
/** Buffer for outgoing packets. */
/*@{*/
/*@}*/
int stream_num; ///< stream numbers.
+ unsigned int nb_streams_allocated; ///< allocated size of streams
} MMSContext;
int ff_mms_asf_header_parser(MMSContext * mms);
}
/* free all separately allocated pointers in mms */
+ av_free(mms->streams);
av_free(mms->asf_header);
av_freep(&h->priv_data);