Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaPlayer reset function causes that video can not play. #21

Closed
fantasy1022 opened this issue May 8, 2014 · 4 comments
Closed

MediaPlayer reset function causes that video can not play. #21

fantasy1022 opened this issue May 8, 2014 · 4 comments
Labels

Comments

@fantasy1022
Copy link

I use mediaplayer and surface view to construct player to play video.
Firstly, playing video is successful and then use mediaplayer API reset() to prepare playing next video.

But the next video can not play. Log shows messages which below:
Error: the video system does not support an image
size of 1280x720 pixels. Try using -lowres or -vf "scale=w:h"
to reduce the image size.

So, I find the way to solve this problem. Release mediaplayer and new another mediaplayer instance.

Is function of ijkplayer API reset just like Android mediaplayer? Or has a another way to manipulate?

@fantasy1022 fantasy1022 changed the title MediaPlayer reset function cause that video can not play. MediaPlayer reset function causes that video can not play. May 8, 2014
@bbcallen
Copy link
Contributor

bbcallen commented May 8, 2014

The reset() function is supposed to work like Android media player, but it has not been tested yet for now.
If you find any fix, pull request is welcome.

@fantasy1022
Copy link
Author

Ok, I understand it.
If i find the method to fix, i would push request.

@ek99800
Copy link

ek99800 commented May 19, 2014

Here is another issues of the reset() api, Android. It will be blocked if the video source is stoped. The reset() api will hang in:
static void stream_close(FFPlayer *ffp);

and wait for the read_tid thread:
ALOGW("wait for read_tid\n");
SDL_WaitThread(is->read_tid, NULL);
ALOGW("wait for video_refresh_tid\n");
SDL_WaitThread(is->video_refresh_tid, NULL);

Is it because the av_frame_read() is blocked in reading datas then the read thread can not handle the is->abort_request flag ?

@bbcallen bbcallen added the bug label Jun 20, 2014
@bbcallen
Copy link
Contributor

fixed: 5f00a1b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants