Mercurial > libavformat.hg
comparison matroska.c @ 1530:f65cd8910a5c libavformat
simplify free()+set to NULL using av_freep()
author | aurel |
---|---|
date | Mon, 20 Nov 2006 00:04:08 +0000 |
parents | 1bf0132b9dff |
children | b9caa8a8d77d |
comparison
equal
deleted
inserted
replaced
1529:07898e88c5b9 | 1530:f65cd8910a5c |
---|---|
986 (matroska->num_packets - 1) * sizeof(AVPacket *)); | 986 (matroska->num_packets - 1) * sizeof(AVPacket *)); |
987 matroska->packets = | 987 matroska->packets = |
988 av_realloc(matroska->packets, (matroska->num_packets - 1) * | 988 av_realloc(matroska->packets, (matroska->num_packets - 1) * |
989 sizeof(AVPacket *)); | 989 sizeof(AVPacket *)); |
990 } else { | 990 } else { |
991 av_free(matroska->packets); | 991 av_freep(&matroska->packets); |
992 matroska->packets = NULL; | |
993 } | 992 } |
994 matroska->num_packets--; | 993 matroska->num_packets--; |
995 return 0; | 994 return 0; |
996 } | 995 } |
997 | 996 |