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

Commit 1dd6f424 authored by vivek mehta's avatar vivek mehta Committed by Steve Kondik
Browse files

MediaMuxer: handle expection for add track

Native addTrack call throws IllegalArgumentException on failure.
Catch this exception in MediaMuxer and throw IllegalArgumentException
that calling function can trap.

Change-Id: I97239ee2272c754ef6d7d54c5a27d1889ac01b80
parent f8146d56
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -276,7 +276,11 @@ final public class MediaMuxer {
                values[i] = entry.getValue();
                ++i;
            }
            try {
                trackIndex = nativeAddTrack(mNativeObject, keys, values);
            } catch (IllegalStateException ex) {
                throw new IllegalArgumentException("format not supported");
            }
        } else {
            throw new IllegalArgumentException("format must not be empty.");
        }