diff options
author | Robert Shih <robertshih@google.com> | 2014-07-23 01:31:34 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-07-22 16:13:36 +0000 |
commit | f6f4c0d7c5e2d33b38f080896466e56e2d0a97d4 (patch) | |
tree | 91469dbf726e28b68a80af692bd4160381c62e64 /media/libmedia | |
parent | b104d5a4dfbd8415f6bc227106b9f0130350d79a (diff) | |
parent | 114819633470ebd5b346c13c2a82a0025d2d39c0 (diff) | |
download | frameworks_av-f6f4c0d7c5e2d33b38f080896466e56e2d0a97d4.zip frameworks_av-f6f4c0d7c5e2d33b38f080896466e56e2d0a97d4.tar.gz frameworks_av-f6f4c0d7c5e2d33b38f080896466e56e2d0a97d4.tar.bz2 |
Merge "StagefrightRecorder: webm (video only) support" into lmp-dev
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/mediarecorder.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp index c8192e9..1952b86 100644 --- a/media/libmedia/mediarecorder.cpp +++ b/media/libmedia/mediarecorder.cpp @@ -186,8 +186,11 @@ status_t MediaRecorder::setOutputFormat(int of) ALOGE("setOutputFormat called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } - if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START && of != OUTPUT_FORMAT_RTP_AVP && of != OUTPUT_FORMAT_MPEG2TS) { //first non-video output format - ALOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of); + if (mIsVideoSourceSet + && of >= OUTPUT_FORMAT_AUDIO_ONLY_START //first non-video output format + && of < OUTPUT_FORMAT_AUDIO_ONLY_END) { + ALOGE("output format (%d) is meant for audio recording only" + " and incompatible with video recording", of); return INVALID_OPERATION; } |