Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6761025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:08:13+00:00 2026-05-26T14:08:13+00:00

I have an application with a video player. I implemented a method that stores

  • 0

I have an application with a video player. I implemented a method that stores the current position in the video so that the next time user plays the same video, it is played from where the user left it. However, I am unable to load the video from the position from where it is left. The log cat shows this error continuously

10-23 21:23:23.699: ERROR/TI_Video_Decoder(1250): Unknown event: 1
10-23 21:23:23.699: ERROR/TI_Video_Decoder(1250): Corrupted Data in buffer 0x2b59c8 0(int# 0/0)
10-23 21:23:23.699: ERROR/TI_Video_Decoder(1250): Unknown event: 1
10-23 21:23:23.699: ERROR/TI_Video_Decoder(1250): Corrupted Data in buffer 0x4a2ad0 0(int# 0/0)
10-23 21:23:23.699: ERROR/TI_Video_Decoder(1250): Unknown event: 1
10-23 21:23:23.699: ERROR/TI_Video_Decoder(1250): Corrupted Data in buffer 0x2b5a20 0(int# 0/0)
10-23 21:23:23.699: ERROR/TI_Video_Decoder(1250): Unknown event: 1
10-23 21:23:23.699: ERROR/TI_Video_Decoder(1250): Unknown event: 1
10-23 21:23:23.699: ERROR/TI_Video_Decoder(1250): Corrupted Data in buffer 0x1c09a0 0(int# 0/0)
10-23 21:23:23.699: ERROR/TI_Video_Decoder(1250): Unknown event: 1
10-23 21:23:23.699: ERROR/TI_Video_Decoder(1250): Unknown event: 1
10-23 21:23:23.699: ERROR/TI_Video_Decoder(1250): Corrupted Data in buffer 0x3dafa0 0(int# 0/0)
10-23 21:23:23.707: ERROR/TI_Video_Decoder(1250): Unknown event: 1
10-23 21:23:23.707: ERROR/TI_Video_Decoder(1250): Unknown event: 1
10-23 21:23:23.707: ERROR/TI_Video_Decoder(1250): Unknown event: 1
10-23 21:23:23.707: ERROR/TI_Video_Decoder(1250): Corrupted Data in buffer 0x2b59c8 0(int# 0/0)
10-23 21:23:23.707: ERROR/TI_Video_Decoder(1250): Corrupted Data in buffer 0x1c4028 0(int# 0/0)
10-23 21:23:23.707: ERROR/TI_Video_Decoder(1250): Corrupted Data in buffer 0x2b5a20 0(int# 0/0)
10-23 21:23:23.707: ERROR/TI_Video_Decoder(1250): Corrupted Data in buffer 0x4a2ad0 0(int# 0/0)

This is my code for playing the video. Can anyone guide me here why I am getting this error. Thanks.. Here is the code

public class Player extends Activity {

private static Context mContext;
private int mStartTime = 0;
private int sliderPosition; 
private int setTime;
private String uriString; 
private MediaPlayer player;

private class ErrorListener implements OnErrorListener {

private class CompletionListener implements OnCompletionListener {
    // FIXME: @Override
    public void onCompletion(MediaPlayer mp) {
        mContext = null;
        mStartTime = 0;
        System.exit(-1);
    }
}

private static Context getContext() {
    return mContext;
}

private static void setContext(Context context) {
    mContext = context;
}

@Override
public void onCreate(Bundle savedInstanceState) {
    System.gc();
super.onCreate(savedInstanceState);
    setContext(this);
    Intent intent = getIntent();
    Uri uri = intent.getData();
    uriString = intent.getStringExtra("filename" );
    if (uri != null) {  
        setContentView(R.layout.videoview);
        VideoView videoView = (VideoView) findViewById(R.id.videoview);
        videoView.setVideoURI(uri);
        videoView.setMediaController(new MediaController(this));
        videoView.setOnErrorListener(new ErrorListener());
        videoView.setOnCompletionListener(new CompletionListener());
        videoView.setKeepScreenOn(true);
        videoView.requestFocus();
    }
}//onCreate Method Ends

public void onStart(){
    super.onStart();
    VideoView videoView = (VideoView) findViewById(R.id.videoview);
    SharedPreferences Settings = getSharedPreferences("MyStoragePreferences", MODE_PRIVATE);
  if(Settings.contains(uriString))
    {
        setTime= Settings.getInt(uriString, 0);
        videoView.seekTo(setTime);
    videoView.start();
    }
    else
    {
        videoView.seekTo(mStartTime);
        videoView.seekTo(0);
        if (mStartTime == 0){
        videoView.start();
        }
    }
}

public void onSaveInstanceState(Bundle outState){
    VideoView videoView = (VideoView) findViewById(R.id.videoview);
    mStartTime = videoView.getCurrentPosition();
    outState.putInt("restartTime", mStartTime);
    super.onSaveInstanceState(outState);
}

@Override
protected void onDestroy() {
    mContext = null;
    super.onDestroy();
}

@Override
protected void onStop(){
    super.onStop();
    VideoView videoView = (VideoView) findViewById(R.id.videoview);
    videoView.stopPlayback();

}

@Override
protected void onPause(){
    super.onPause();
    VideoView videoView = (VideoView) findViewById(R.id.videoview);
    sliderPosition= videoView.getCurrentPosition();
    SharedPreferences Settings = getSharedPreferences("MyStoragePreferences", MODE_PRIVATE);
    SharedPreferences.Editor prefEditor = Settings.edit();
    prefEditor.putInt(uriString, sliderPosition);
    prefEditor.commit();
}

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:08:14+00:00Added an answer on May 26, 2026 at 2:08 pm

    From the documentation:

    Although the asynchronuous seekTo(int) call returns right way, the actual seek operation may take a while to finish, especially for audio/video being streamed. When the actual seek operation completes, the internal player engine calls a user supplied OnSeekComplete.onSeekComplete() if an OnSeekCompleteListener has been registered beforehand via setOnSeekCompleteListener(OnSeekCompleteListener).

    The reason you are probably getting this error is because the media player seeks slowly, so by the time you start playing your video, it is not done seeking. Hence it reads corrupted buffers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that plays video files. I have been using code for
I am developing a web-application in grails.In that I have implemented video's playing option.For
i have a web application for video uploading,In that i want to show the
in my application i have the playvideo page where video will play, below that
I'm creating an OS X application, and I have a video player in a
I have a PhoneGap application I am developing for iPad that uses video extensively,
I have an old video player software that works happily on XP but refuses
I am developing an application that loads images and video into a Flash player
I have two applications that play video. in one of them the JWplayer plays
I have an air application that I'd like to turn into a multi-player game.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.