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:
a85ab8a
)
adxenc: log an error message and return AVERROR(EINVAL) for invalid channels
author
Justin Ruggles
<justin.ruggles@gmail.com>
Mon, 19 Dec 2011 14:45:17 +0000
(09:45 -0500)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Tue, 3 Jan 2012 23:47:41 +0000
(18:47 -0500)
libavcodec/adxenc.c
patch
|
blob
|
history
diff --git
a/libavcodec/adxenc.c
b/libavcodec/adxenc.c
index
cff5bb8
..
a580bb3
100644
(file)
--- a/
libavcodec/adxenc.c
+++ b/
libavcodec/adxenc.c
@@
-101,8
+101,10
@@
static av_cold int adx_encode_init(AVCodecContext *avctx)
{
ADXContext *c = avctx->priv_data;
- if (avctx->channels > 2)
- return -1;
+ if (avctx->channels > 2) {
+ av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n");
+ return AVERROR(EINVAL);
+ }
avctx->frame_size = 32;
avctx->coded_frame = avcodec_alloc_frame();