diff options
Diffstat (limited to 'libavformat/mmst.c')
-rw-r--r-- | libavformat/mmst.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/mmst.c b/libavformat/mmst.c index 7bb4358060..9d7fd7471c 100644 --- a/libavformat/mmst.c +++ b/libavformat/mmst.c @@ -470,7 +470,6 @@ static int mms_close(URLContext *h) /* free all separately allocated pointers in mms */ av_free(mms->streams); av_free(mms->asf_header); - av_freep(&h->priv_data); return 0; } @@ -502,15 +501,12 @@ static void clear_stream_buffers(MMSContext *mms) static int mms_open(URLContext *h, const char *uri, int flags) { - MMSTContext *mmst; + MMSTContext *mmst = h->priv_data; MMSContext *mms; int port, err; char tcpname[256]; h->is_streamed = 1; - mmst = h->priv_data = av_mallocz(sizeof(MMSTContext)); - if (!h->priv_data) - return AVERROR(ENOMEM); mms = &mmst->mms; // only for MMS over TCP, so set proto = NULL @@ -628,4 +624,5 @@ URLProtocol ff_mmst_protocol = { .url_open = mms_open, .url_read = mms_read, .url_close = mms_close, + .priv_data_size = sizeof(MMSTContext), }; |