diff options
author | Steve Kondik <steve@cyngn.com> | 2015-12-13 16:01:02 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-12-13 16:01:02 -0800 |
commit | 1512587eb162be68b62161371a4ad1ce81b5377b (patch) | |
tree | 649c848a0d0ed5fc57f2b8e835c07bf783364f97 | |
parent | 90ef5244517520eb54f7516465050b911f68de51 (diff) | |
download | frameworks_av-1512587eb162be68b62161371a4ad1ce81b5377b.zip frameworks_av-1512587eb162be68b62161371a4ad1ce81b5377b.tar.gz frameworks_av-1512587eb162be68b62161371a4ad1ce81b5377b.tar.bz2 |
stagefright: Check vendor list for allowed encoders
Change-Id: Ie9ff0d275fc5f853c18fe4d5e590443d0c316e99
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index 81d8e7b..6baca4d 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -185,7 +185,8 @@ status_t StagefrightRecorder::setAudioEncoder(audio_encoder ae) { status_t StagefrightRecorder::setVideoEncoder(video_encoder ve) { ALOGV("setVideoEncoder: %d", ve); if (ve < VIDEO_ENCODER_DEFAULT || - ve >= VIDEO_ENCODER_LIST_END) { + (ve >= VIDEO_ENCODER_LIST_END && ve <= VIDEO_ENCODER_LIST_VENDOR_START) || + ve >= VIDEO_ENCODER_LIST_VENDOR_END) { ALOGE("Invalid video encoder: %d", ve); return BAD_VALUE; } |