Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

Tuto7 : Async after seeking backwards #27

Open
kherounts opened this issue Jul 9, 2015 · 2 comments
Open

Tuto7 : Async after seeking backwards #27

kherounts opened this issue Jul 9, 2015 · 2 comments

Comments

@kherounts
Copy link

Hi
The image and the audio are not synchronized anymore, once seeked backwards. The image seems to be in the correct position unlike the audio. However, the video becomes synchronized subsequently being seeked forwards once.
Do you have any idea how to resolve this problem?

@kherounts
Copy link
Author

Finally I found the solution. In the seek part of decode_thread() I changed :

if(is->audioStream >= 0) {
packet_queue_flush(&is->audioq);
packet_queue_put(&is->audioq, &flush_pkt);
}
if(is->videoStream >= 0) {
packet_queue_flush(&is->videoq);
packet_queue_put(&is->videoq, &flush_pkt);
}

to :

if(is->videoStream >= 0) {
packet_queue_flush(&is->videoq);
packet_queue_put(&is->videoq, &flush_pkt);
}
else if(is->audioStream >= 0) {
packet_queue_flush(&is->audioq);
packet_queue_put(&is->audioq, &flush_pkt);
}

@mpenkov
Copy link
Owner

mpenkov commented Aug 3, 2015

Can you push your changes?

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

No branches or pull requests

2 participants