Revision e31a7441 libavcodec/flashsv.c

View differences:

libavcodec/flashsv.c
133 133
    /* the block size could change between frames, make sure the buffer
134 134
     * is large enough, if not, get a larger one */
135 135
    if(s->block_size < s->block_width*s->block_height) {
136
        if (s->tmpblock != NULL)
137
            av_free(s->tmpblock);
136
        av_free(s->tmpblock);
138 137
        if ((s->tmpblock = av_malloc(3*s->block_width*s->block_height)) == NULL) {
139 138
            av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
140 139
            return -1;
......
243 242
        avctx->release_buffer(avctx, &s->frame);
244 243

  
245 244
    /* free the tmpblock */
246
    if (s->tmpblock != NULL)
247
        av_free(s->tmpblock);
245
    av_free(s->tmpblock);
248 246

  
249 247
    return 0;
250 248
}

Also available in: Unified diff