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

Skip to content
Commit 55203e2e authored by Taiju Tsuiki's avatar Taiju Tsuiki
Browse files

Fix potential double close in IMediaMetadataRetriever::setDataSource

IMediaMetadataRetriever::setDataSource(fd, offset, length) takes the ownership
of |fd| on the direct invocation, and doesn't take the ownership on invocation
from Binder. This is inconsintent to other similar methods like
IMediaPlayer::setDataSource, and causes potential double close of |fd|.

This CL changes the caller and implementations to leave the ownership to make
them consistent.
Also, fixes a double close in IMediaPlayerService::setDataSource in an error
case.

Change-Id: Id551a1e725c4392b0fe6b7293871212eb101c0a5
parent 4491a4ab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment