diff options
-rw-r--r-- | media/libstagefright/MediaSync.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/libstagefright/MediaSync.cpp b/media/libstagefright/MediaSync.cpp index 7b6c7d9..ec956c4 100644 --- a/media/libstagefright/MediaSync.cpp +++ b/media/libstagefright/MediaSync.cpp @@ -115,6 +115,11 @@ status_t MediaSync::configureAudioTrack( return INVALID_OPERATION; } + if (audioTrack != NULL && nativeSampleRateInHz <= 0) { + ALOGE("configureAudioTrack: native sample rate should be positive."); + return BAD_VALUE; + } + mAudioTrack = audioTrack; mNativeSampleRateInHz = nativeSampleRateInHz; |