Commit b9004bd5 authored by Clément Bœsch's avatar Clément Bœsch Committed by Michael Niedermayer

Remove a few if (p) av_freep(&p) forms

Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
(cherry picked from commit 523d9407)
parent c54ac7a8
...@@ -527,8 +527,7 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) { ...@@ -527,8 +527,7 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) {
xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL); xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL);
if( avctx->extradata != NULL ) av_freep(&avctx->extradata);
av_freep(&avctx->extradata);
if( x->twopassbuffer != NULL ) { if( x->twopassbuffer != NULL ) {
av_free(x->twopassbuffer); av_free(x->twopassbuffer);
av_free(x->old_twopassbuffer); av_free(x->old_twopassbuffer);
......
...@@ -67,7 +67,7 @@ void *av_tree_find(const struct AVTreeNode *root, void *key, int (*cmp)(void *ke ...@@ -67,7 +67,7 @@ void *av_tree_find(const struct AVTreeNode *root, void *key, int (*cmp)(void *ke
* return av_tree_insert(rootp, key, cmp, next); * return av_tree_insert(rootp, key, cmp, next);
* } * }
* void *tree_remove(struct AVTreeNode **rootp, void *key, int (*cmp)(void *key, const void *b, AVTreeNode **next)){ * void *tree_remove(struct AVTreeNode **rootp, void *key, int (*cmp)(void *key, const void *b, AVTreeNode **next)){
* if(*next) av_freep(next); * av_freep(next);
* return av_tree_insert(rootp, key, cmp, next); * return av_tree_insert(rootp, key, cmp, next);
* } * }
* @endcode * @endcode
......
...@@ -104,8 +104,7 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, ...@@ -104,8 +104,7 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,
int p; int p;
for (p = 0; p < 4; p++) for (p = 0; p < 4; p++)
if (src[p]) av_freep(&src[p]);
av_freep(&src[p]);
av_image_fill_linesizes(srcStride, srcFormat, srcW); av_image_fill_linesizes(srcStride, srcFormat, srcW);
for (p = 0; p < 4; p++) { for (p = 0; p < 4; p++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment