how to loop a file playback with AV read frame
Hello I need some help with seeking in file back to zero position - here is what I am writing currently if(av_read_frame(avformatCtx, packet) < 0) { eof = 1; av_seek_frame(avformatCtx, ffStreamIdx, 0, AVSEEK_FLAG_FRAME); } else { stuffFrame( VideoBuffer, &frameAttrib, NULL, NULL, ... } Is it valid? I get vibrating picture afetr looping- may because of pts reordering? thank you for any help
On Sun, Mar 14, 2010 at 2:58 AM, Vogel Ubrhar <vubrhar at gmail.com> wrote:
Hello I need some help with seeking in file back to zero position - here is what I am writing currently
if(av_read_frame(avformatCtx, packet) < 0) {
eof = 1; av_seek_frame(avformatCtx, ffStreamIdx, 0, AVSEEK_FLAG_FRAME); } else { stuffFrame( VideoBuffer, &frameAttrib, NULL, NULL, ... }
Is it valid? I get vibrating picture afetr looping- may because of pts reordering?
thank you for any help _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
You may need to close the decoder then re-open it. Just a guess though.
Is it the only way? I think there is some avcontext flags I can reset perhaps? There are so many of them, I dont know which one could cause this issue , may be reordering of decoded packets become wrong? It doesnt go away On Mon, Mar 15, 2010 at 5:27 AM, David Kempers <davidkempers at gmail.com>wrote:
On Sun, Mar 14, 2010 at 2:58 AM, Vogel Ubrhar <vubrhar at gmail.com> wrote:
Hello I need some help with seeking in file back to zero position - here is what I am writing currently
if(av_read_frame(avformatCtx, packet) < 0) {
eof = 1; av_seek_frame(avformatCtx, ffStreamIdx, 0, AVSEEK_FLAG_FRAME); } else { stuffFrame( VideoBuffer, &frameAttrib, NULL, NULL, ... }
Is it valid? I get vibrating picture afetr looping- may because of pts reordering?
thank you for any help _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
You may need to close the decoder then re-open it.
Just a guess though. _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
participants (2)
-
davidkempers@gmail.com -
vubrhar@gmail.com