libeplayer3: minor changes

This commit is contained in:
martii
2013-07-07 15:59:55 +02:00
committed by Stefan Seyfried
parent dc85e1c284
commit dfa1a3e32b
3 changed files with 20 additions and 8 deletions

View File

@@ -730,6 +730,9 @@ static void FFMPEGThread(Context_t *context) {
if (context->output->audio->Write(context, &avOut) < 0)
ffmpeg_err("writing data to audio device failed\n");
av_freep(&output);
#ifdef USE_LIBSWRESAMPLE
currentAudioPts = pts = swr_next_pts(swr, INT64_MIN);
#endif
}
}
else if (audioTrack->have_aacheader == 1)
@@ -1683,8 +1686,8 @@ static int container_ffmpeg_seek_rel(Context_t *context, off_t pos, long long in
return cERR_CONTAINER_FFMPEG_ERR;
}
context->output->Command(context, OUTPUT_FLUSH, NULL); // martii
context->output->Command(context, OUTPUT_PLAY, NULL); // martii
context->output->Command(context, OUTPUT_FLUSH, NULL);
context->output->Command(context, OUTPUT_PLAY, NULL);
latestPts = 0;
#if 1
if (videoTrack && videoTrack->stream && ((AVStream*) videoTrack->stream)->codec && ((AVStream*) videoTrack->stream)->codec->codec)
@@ -1802,8 +1805,8 @@ static int container_ffmpeg_seek(Context_t *context, float sec, int absolute) {
return cERR_CONTAINER_FFMPEG_ERR;
}
context->output->Command(context, OUTPUT_FLUSH, NULL); // martii
context->output->Command(context, OUTPUT_PLAY, NULL); // martii
context->output->Command(context, OUTPUT_FLUSH, NULL);
context->output->Command(context, OUTPUT_PLAY, NULL);
latestPts = 0;
#if 1
if (videoTrack && videoTrack->stream && ((AVStream*) videoTrack->stream)->codec && ((AVStream*) videoTrack->stream)->codec->codec)