1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

use av memory handling functions

Originally committed as revision 528 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Fabrice Bellard
2002-05-18 23:11:09 +00:00
parent 065422677a
commit 1ea4f59365
23 changed files with 110 additions and 273 deletions

View File

@@ -60,7 +60,7 @@ int url_open(URLContext **puc, const char *filename, int flags)
}
return -ENOENT;
found:
uc = malloc(sizeof(URLContext));
uc = av_malloc(sizeof(URLContext));
if (!uc)
return -ENOMEM;
uc->prot = up;
@@ -69,7 +69,7 @@ int url_open(URLContext **puc, const char *filename, int flags)
uc->packet_size = 1; /* default packet size */
err = up->url_open(uc, filename, flags);
if (err < 0) {
free(uc);
av_free(uc);
*puc = NULL;
return err;
}
@@ -118,7 +118,7 @@ int url_close(URLContext *h)
int ret;
ret = h->prot->url_close(h);
free(h);
av_free(h);
return ret;
}