Hi,All  
    I implemented one android application for playing music using FFMPEG .
But, seeking for some audio files are inaccurate.Means, song is playing out
of total duration also. This issue is coming while seeking the audio file.
If I play continuously without seek, then there is no issue. I have used
below code .

int64_t target = av_rescale_q(seekValue * AV_TIME_BASE,
                                                AV_TIME_BASE_Q,
                                                
fmt_ctx->streams[seekStreamIndex]->time_base);
int err = avformat_seek_file(fmt_ctx, audio_stream_index,
                                                INT64_MIN, target, INT64_MAX, 
AVSEEK_FLAG_FRAME);
                           if (err < 0) {
                             LOGE("Error while seeking");
                                } else {
                                        avcodec_flush_buffers(dec_ctx);
                                }

       The above code is working fine for some songs but problem with some
mp3 songs.Please provide any information about   this issue.




--
View this message in context: 
http://libav-users.943685.n4.nabble.com/FFMPEG-Seek-Issue-tp4660726.html
Sent from the libav-users mailing list archive at Nabble.com.
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to