Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1512587e authored by Steve Kondik's avatar Steve Kondik
Browse files

stagefright: Check vendor list for allowed encoders

Change-Id: Ie9ff0d275fc5f853c18fe4d5e590443d0c316e99
parent 90ef5244
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
    }