OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e86c27
)
lavr: return an error if a avresample_open() is called on an open context
author
Anton Khirnov
<anton@khirnov.net>
Thu, 25 Apr 2013 18:12:47 +0000
(20:12 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Sat, 22 Feb 2014 19:53:09 +0000
(20:53 +0100)
libavresample/utils.c
patch
|
blob
|
history
diff --git
a/libavresample/utils.c
b/libavresample/utils.c
index
306b67c
..
63d6530
100644
(file)
--- a/
libavresample/utils.c
+++ b/
libavresample/utils.c
@@
-36,6
+36,11
@@
int avresample_open(AVAudioResampleContext *avr)
{
int ret;
+ if (avresample_is_open(avr)) {
+ av_log(avr, AV_LOG_ERROR, "The resampling context is already open.\n");
+ return AVERROR(EINVAL);
+ }
+
/* set channel mixing parameters */
avr->in_channels = av_get_channel_layout_nb_channels(avr->in_channel_layout);
if (avr->in_channels <= 0 || avr->in_channels > AVRESAMPLE_MAX_CHANNELS) {