Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 523d9407d57e9210428b6d962f0ebf48aae55638)
| ... | ... |
@@ -527,8 +527,7 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) {
|
| 527 | 527 |
|
| 528 | 528 |
xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL); |
| 529 | 529 |
|
| 530 |
- if( avctx->extradata != NULL ) |
|
| 531 |
- av_freep(&avctx->extradata); |
|
| 530 |
+ av_freep(&avctx->extradata); |
|
| 532 | 531 |
if( x->twopassbuffer != NULL ) {
|
| 533 | 532 |
av_free(x->twopassbuffer); |
| 534 | 533 |
av_free(x->old_twopassbuffer); |
| ... | ... |
@@ -67,7 +67,7 @@ void *av_tree_find(const struct AVTreeNode *root, void *key, int (*cmp)(void *ke |
| 67 | 67 |
* return av_tree_insert(rootp, key, cmp, next); |
| 68 | 68 |
* } |
| 69 | 69 |
* void *tree_remove(struct AVTreeNode **rootp, void *key, int (*cmp)(void *key, const void *b, AVTreeNode **next)){
|
| 70 |
- * if(*next) av_freep(next); |
|
| 70 |
+ * av_freep(next); |
|
| 71 | 71 |
* return av_tree_insert(rootp, key, cmp, next); |
| 72 | 72 |
* } |
| 73 | 73 |
* @endcode |
| ... | ... |
@@ -104,8 +104,7 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, |
| 104 | 104 |
int p; |
| 105 | 105 |
|
| 106 | 106 |
for (p = 0; p < 4; p++) |
| 107 |
- if (src[p]) |
|
| 108 |
- av_freep(&src[p]); |
|
| 107 |
+ av_freep(&src[p]); |
|
| 109 | 108 |
|
| 110 | 109 |
av_image_fill_linesizes(srcStride, srcFormat, srcW); |
| 111 | 110 |
for (p = 0; p < 4; p++) {
|