Skip to content

Commit

Permalink
ijkplayer: fix a bug about ijkio cache statistic
Browse files Browse the repository at this point in the history
  • Loading branch information
raymond1012 committed Sep 8, 2017
1 parent c1f99f1 commit b56ba90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ijkmedia/ijkplayer/ff_ffplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -3847,7 +3847,7 @@ static int ijkio_app_func_event(IjkIOApplicationContext *h, int message ,void *d
ffp->stat.logical_file_size = statistic->logical_file_size;
}

return inject_callback(ffp->inject_opaque, IJKIOAPP_EVENT_CACHE_STATISTIC, data, size);
return 0;
}

void ffp_set_frame_at_time(FFPlayer *ffp, const char *path, int64_t start_time, int64_t end_time, int num, int definition) {
Expand Down
4 changes: 4 additions & 0 deletions ijkmedia/ijkplayer/ijkavformat/ijkiocache.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ static int ijkio_cache_io_open(IjkURLContext *h, const char *url, int flags, Ijk
c->tree_info->file_size = c->logical_size;
}
}

call_inject_statistic(h);
return ret;
}

Expand Down Expand Up @@ -669,6 +671,7 @@ static int ijkio_cache_open(IjkURLContext *h, const char *url, int flags, IjkAVD
ijk_av_dict_copy(&c->inner_options, *options, 0);
strcpy(c->inner_url, url);
c->inner_flags = flags;
call_inject_statistic(h);
}
}

Expand Down Expand Up @@ -977,6 +980,7 @@ static int ijkio_cache_read(IjkURLContext *h, unsigned char *buf, int size) {
if (ret >= 0) {
c->read_logical_pos += ret;
}
call_inject_statistic(h);
return ret;
}

Expand Down

0 comments on commit b56ba90

Please sign in to comment.