Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

NullPointerException in StreamBase.getVideoData

Open
#1,914 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, java, kotlin

Research direction

The crash is in the video info callback StreamBase$getVideoData$1.onVideoInfo, reached from VideoEncoder.requestKeyframe (VideoEncoder.java:263) during checkBuffer. Start by reading how StreamBase.getVideoData sets up that callback and why a field it uses can be null when the encoder emits an output buffer. The issue has no reproduction steps and no test, so 'done' needs a device or emulator run that reproduces the NPE, then a fix that stops it. Expect to ask the maintainer for steps first.

Written by the indexing model from the issue text.

Description

Title: NullPointerException in StreamBase.getVideoData on Android 14 (Oppo Reno8 T)

Describe the bug
The application crashes with a NullPointerException originating from the StreamBase$getVideoData$1.onVideoInfo method when the video encoder processes an output buffer. This crash occurs specifically on an Oppo Reno8 T running Android 14.

To Reproduce
Steps to reproduce the behavior:

  • No steps available

Expected behavior
The stream should start successfully and continue running without crashing.

Screenshots
N/A (Crash log provided)

Smartphone (please complete the following information):

  • Library version: 2.6.4
  • Device: Oppo Reno8 T
  • OS: Android 14 (SDK 34)

Additional context

Crash Log (Stack Trace)
Exception java.lang.NullPointerException:
  at com.pedro.library.base.StreamBase$getVideoData$1.onVideoInfo (Unknown Source:2)
  at com.pedro.encoder.video.VideoEncoder.requestKeyframe (VideoEncoder.java:263)
  at com.pedro.encoder.video.VideoEncoder.checkBuffer (VideoEncoder.java:527)
  at com.pedro.encoder.BaseEncoder.processOutput (BaseEncoder.java:261)
  at com.pedro.encoder.BaseEncoder.outputAvailable (BaseEncoder.java:295)
  at com.pedro.encoder.BaseEncoder$1.onOutputBufferAvailable (BaseEncoder.java:315)
  at android.media.MediaCodec$EventHandler.handleCallback (MediaCodec.java:1943)
  at android.media.MediaCodec$EventHandler.handleMessage (MediaCodec.java:1841)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:257)
  at android.os.Looper.loop (Looper.java:368)
  at android.os.HandlerThread.run (HandlerThread.java:67)

implementation("com.github.pedroSG94.RootEncoder:library:2.6.4")

Dominant language
Kotlin
Stars
3k
Forks
946
Avg merge
4d 6h
Merged PRs (30d)
9

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pedroSG94/RootEncoder

All issues in pedroSG94/RootEncoder

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.