Loading media/libstagefright/StagefrightMetadataRetriever.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -158,11 +158,14 @@ static VideoFrame *extractVideoFrame( // TODO: Use Flexible color instead videoFormat->setInt32("color-format", OMX_COLOR_FormatYUV420Planar); // For the thumbnail extraction case, try to allocate single buffer // in both input and output ports. NOTE: This request may fail if // component requires more than that for decoding. // For the thumbnail extraction case, try to allocate single buffer in both // input and output ports, if seeking to a sync frame. NOTE: This request may // fail if component requires more than that for decoding. bool isSeekingClosest = (seekMode == MediaSource::ReadOptions::SEEK_CLOSEST); if (!isSeekingClosest) { videoFormat->setInt32("android._num-input-buffers", 1); videoFormat->setInt32("android._num-output-buffers", 1); } status_t err; sp<ALooper> looper = new ALooper; Loading Loading @@ -254,7 +257,6 @@ static VideoFrame *extractVideoFrame( bool isAvcOrHevc = !strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_AVC) || !strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_HEVC); bool isSeekingClosest = (seekMode == MediaSource::ReadOptions::SEEK_CLOSEST); bool firstSample = true; int64_t targetTimeUs = -1ll; Loading Loading
media/libstagefright/StagefrightMetadataRetriever.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -158,11 +158,14 @@ static VideoFrame *extractVideoFrame( // TODO: Use Flexible color instead videoFormat->setInt32("color-format", OMX_COLOR_FormatYUV420Planar); // For the thumbnail extraction case, try to allocate single buffer // in both input and output ports. NOTE: This request may fail if // component requires more than that for decoding. // For the thumbnail extraction case, try to allocate single buffer in both // input and output ports, if seeking to a sync frame. NOTE: This request may // fail if component requires more than that for decoding. bool isSeekingClosest = (seekMode == MediaSource::ReadOptions::SEEK_CLOSEST); if (!isSeekingClosest) { videoFormat->setInt32("android._num-input-buffers", 1); videoFormat->setInt32("android._num-output-buffers", 1); } status_t err; sp<ALooper> looper = new ALooper; Loading Loading @@ -254,7 +257,6 @@ static VideoFrame *extractVideoFrame( bool isAvcOrHevc = !strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_AVC) || !strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_HEVC); bool isSeekingClosest = (seekMode == MediaSource::ReadOptions::SEEK_CLOSEST); bool firstSample = true; int64_t targetTimeUs = -1ll; Loading