summaryrefslogtreecommitdiff
path: root/modules/avformat/avformat.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/avformat/avformat.c')
-rw-r--r--modules/avformat/avformat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/avformat/avformat.c b/modules/avformat/avformat.c
index 64f6a4f..909ac75 100644
--- a/modules/avformat/avformat.c
+++ b/modules/avformat/avformat.c
@@ -169,10 +169,13 @@ static void *read_thread(void *data)
while (st->run) {
AVPacket pkt;
+ int ret;
av_init_packet(&pkt);
- if (av_read_frame(st->ic, &pkt) < 0) {
+ ret = av_read_frame(st->ic, &pkt);
+ if (ret < 0) {
+ debug("avformat: rewind stream (ret=%d)\n", ret);
sys_msleep(1000);
av_seek_frame(st->ic, -1, 0, 0);
continue;