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

Commit 74ee3936 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "media: allow 0 video encoder profiles and levels." into sc-dev am: 61082c7c am: 0cc9c050

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15136367

Change-Id: I07146339fddda6164cea597538e9045d6c8dc305
parents c4a1c7ab 0cc9c050
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -844,7 +844,7 @@ public class MediaRecorder implements AudioRouting,
        setVideoSize(profile.getWidth(), profile.getHeight());
        setVideoEncodingBitRate(profile.getBitrate());
        setVideoEncoder(profile.getCodec());
        if (profile.getProfile() > 0) {
        if (profile.getProfile() >= 0) {
            setVideoEncodingProfileLevel(profile.getProfile(), 0 /* level */);
        }
    }
@@ -1125,10 +1125,10 @@ public class MediaRecorder implements AudioRouting,
     * @throws IllegalArgumentException when an invalid profile or level value is used.
     */
    public void setVideoEncodingProfileLevel(int profile, int level) {
        if (profile <= 0)  {
        if (profile < 0)  {
            throw new IllegalArgumentException("Video encoding profile is not positive");
        }
        if (level <= 0)  {
        if (level < 0)  {
            throw new IllegalArgumentException("Video encoding level is not positive");
        }
        setParameter("video-param-encoder-profile=" + profile);