mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
src/sndfile.c : Prevent psf->codec_close() being called more than once.
This commit is contained in:
parent
6f26709560
commit
a3218e1aa1
@ -9,6 +9,9 @@
|
||||
* tests/chunk_test.c tests/test_wrapper.sh.in
|
||||
Test CAF files with custom chunks.
|
||||
|
||||
* src/sndfile.c
|
||||
Prevent psf->codec_close() being called more than once.
|
||||
|
||||
2012-01-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* programs/sndfile-cmp.c
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify
|
||||
** it under the terms of the GNU Lesser General Public License as published by
|
||||
@ -2522,7 +2522,11 @@ psf_close (SF_PRIVATE *psf)
|
||||
int error = 0 ;
|
||||
|
||||
if (psf->codec_close)
|
||||
error = psf->codec_close (psf) ;
|
||||
{ error = psf->codec_close (psf) ;
|
||||
/* To prevent it being called in psf->container_close(). */
|
||||
psf->codec_close = NULL ;
|
||||
} ;
|
||||
|
||||
if (psf->container_close)
|
||||
error = psf->container_close (psf) ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user