summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-10-30 19:55:18 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-10-30 19:55:18 +0100
commit6b296ddf9301401f4900813a970152fff9ac8169 (patch)
tree99a24816d84f3cd7c7cffb416f02e1154c07b814 /modules
parent85bbde9baaeef21a57d75dea35a67a2167c17a55 (diff)
avformat: log a message when rewinding stream
ref. issue #163
Diffstat (limited to 'modules')
-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;