libeplayer3/container_ffmpeg: don't flush instead of clear

This commit is contained in:
martii
2013-07-27 12:24:50 +02:00
parent b64bdcb370
commit c9e0755f02
2 changed files with 7 additions and 5 deletions

View File

@@ -521,7 +521,7 @@ static void FFMPEGThread(Context_t *context) {
avcodec_free_frame(&decoded_frame);
decoded_frame = NULL;
}
context->output->Command(context, OUTPUT_FLUSH, NULL);
context->output->Command(context, OUTPUT_CLEAR, NULL);
context->output->Command(context, OUTPUT_PLAY, NULL);
}

View File

@@ -473,18 +473,18 @@ int LinuxDvbFlush(Context_t *context __attribute__((unused)), char * type) {
getLinuxDVBMutex(FILENAME, __FUNCTION__,__LINE__);
if (video && videofd != -1) {
if (ioctl(videofd, VIDEO_CLEAR_BUFFER) == -1)
if (ioctl(videofd, VIDEO_FLUSH, NULL) == -1)
{
linuxdvb_err("ioctl failed with errno %d\n", errno);
linuxdvb_err("VIDEO_CLEAR_BUFFER: %s\n", strerror(errno));
linuxdvb_err("VIDEO_FLUSH: %s\n", strerror(errno));
}
}
if (audio && audiofd != -1) {
if (ioctl(audiofd, AUDIO_CLEAR_BUFFER) == -1)
if (ioctl(audiofd, AUDIO_FLUSH, NULL) == -1)
{
linuxdvb_err("ioctl failed with errno %d\n", errno);
linuxdvb_err("AUDIO_CLEAR_BUFFER: %s\n", strerror(errno));
linuxdvb_err("AUDIO_FLUSH: %s\n", strerror(errno));
}
}
@@ -1082,6 +1082,8 @@ static int Command(void *_context, OutputCmd_t command, void * argument) {
}
case OUTPUT_CLEAR: {
ret = LinuxDvbClear(context, (char*)argument);
reset(context);
sCURRENT_PTS = 0;
break;
}
case OUTPUT_PTS: {