mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 12:48:35 +00:00
parent
7734cd2c8f
commit
4250fa707b
@ -84,7 +84,14 @@ final class VideoThumbnailsExtractor {
|
|||||||
decoder.configure(mediaFormat, outputSurface.getSurface(), null, 0);
|
decoder.configure(mediaFormat, outputSurface.getSurface(), null, 0);
|
||||||
decoder.start();
|
decoder.start();
|
||||||
|
|
||||||
long duration = mediaFormat.getLong(MediaFormat.KEY_DURATION);
|
long duration = 0;
|
||||||
|
|
||||||
|
if (mediaFormat.containsKey(MediaFormat.KEY_DURATION)) {
|
||||||
|
duration = mediaFormat.getLong(MediaFormat.KEY_DURATION);
|
||||||
|
} else {
|
||||||
|
Log.w(TAG, "Video is missing duration!");
|
||||||
|
}
|
||||||
|
|
||||||
callback.durationKnown(duration);
|
callback.durationKnown(duration);
|
||||||
|
|
||||||
doExtract(extractor, decoder, outputSurface, outputWidthRotated, outputHeightRotated, duration, thumbnailCount, callback);
|
doExtract(extractor, decoder, outputSurface, outputWidthRotated, outputHeightRotated, duration, thumbnailCount, callback);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user