Originally committed as revision 23008 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -169,6 +169,7 @@ int main(int argc, char *argv[]) |
| 169 | 169 |
|
| 170 | 170 |
if (atom_type != MOOV_ATOM) {
|
| 171 | 171 |
printf ("last atom in file was not a moov atom\n");
|
| 172 |
+ free(ftyp_atom); |
|
| 172 | 173 |
fclose(infile); |
| 173 | 174 |
return 0; |
| 174 | 175 |
} |
| ... | ... |
@@ -182,12 +183,14 @@ int main(int argc, char *argv[]) |
| 182 | 182 |
if (!moov_atom) {
|
| 183 | 183 |
printf ("could not allocate %"PRIu64" byte for moov atom\n",
|
| 184 | 184 |
atom_size); |
| 185 |
+ free(ftyp_atom); |
|
| 185 | 186 |
fclose(infile); |
| 186 | 187 |
return 1; |
| 187 | 188 |
} |
| 188 | 189 |
if (fread(moov_atom, atom_size, 1, infile) != 1) {
|
| 189 | 190 |
perror(argv[1]); |
| 190 | 191 |
free(moov_atom); |
| 192 |
+ free(ftyp_atom); |
|
| 191 | 193 |
fclose(infile); |
| 192 | 194 |
return 1; |
| 193 | 195 |
} |
| ... | ... |
@@ -197,6 +200,7 @@ int main(int argc, char *argv[]) |
| 197 | 197 |
if (BE_32(&moov_atom[12]) == CMOV_ATOM) {
|
| 198 | 198 |
printf ("this utility does not support compressed moov atoms yet\n");
|
| 199 | 199 |
free(moov_atom); |
| 200 |
+ free(ftyp_atom); |
|
| 200 | 201 |
fclose(infile); |
| 201 | 202 |
return 1; |
| 202 | 203 |
} |
| ... | ... |
@@ -213,6 +217,7 @@ int main(int argc, char *argv[]) |
| 213 | 213 |
if (i + atom_size - 4 > moov_atom_size) {
|
| 214 | 214 |
printf (" bad atom size\n");
|
| 215 | 215 |
free(moov_atom); |
| 216 |
+ free(ftyp_atom); |
|
| 216 | 217 |
return 1; |
| 217 | 218 |
} |
| 218 | 219 |
offset_count = BE_32(&moov_atom[i + 8]); |
| ... | ... |
@@ -231,6 +236,7 @@ int main(int argc, char *argv[]) |
| 231 | 231 |
if (i + atom_size - 4 > moov_atom_size) {
|
| 232 | 232 |
printf (" bad atom size\n");
|
| 233 | 233 |
free(moov_atom); |
| 234 |
+ free(ftyp_atom); |
|
| 234 | 235 |
return 1; |
| 235 | 236 |
} |
| 236 | 237 |
offset_count = BE_32(&moov_atom[i + 8]); |
| ... | ... |
@@ -255,6 +261,7 @@ int main(int argc, char *argv[]) |
| 255 | 255 |
if (!infile) {
|
| 256 | 256 |
perror(argv[1]); |
| 257 | 257 |
free(moov_atom); |
| 258 |
+ free(ftyp_atom); |
|
| 258 | 259 |
return 1; |
| 259 | 260 |
} |
| 260 | 261 |
|
| ... | ... |
@@ -268,6 +275,7 @@ int main(int argc, char *argv[]) |
| 268 | 268 |
perror(argv[2]); |
| 269 | 269 |
fclose(outfile); |
| 270 | 270 |
free(moov_atom); |
| 271 |
+ free(ftyp_atom); |
|
| 271 | 272 |
return 1; |
| 272 | 273 |
} |
| 273 | 274 |
|