Skip to content

Commit

Permalink
Fixed compatibility with pHash ruby gem (https://github.com/toy/pHash).
Browse files Browse the repository at this point in the history
  • Loading branch information
Chenguang Zhang committed Jul 21, 2014
1 parent 73e9cd9 commit 85218a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pHash-0.9.6/src/cimgffmpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ int NextFrames(VFInfo *st_info, CImgList<uint8_t> *pFrameList)

int GetNumberStreams(const char *file)
{
AVFormatContext *pFormatCtx;
AVFormatContext *pFormatCtx = NULL;
av_log_set_level(AV_LOG_QUIET);
av_register_all();
// Open video file
Expand All @@ -362,7 +362,7 @@ int GetNumberStreams(const char *file)
long GetNumberVideoFrames(const char *file)
{
long nb_frames = 0L;
AVFormatContext *pFormatCtx;
AVFormatContext *pFormatCtx = NULL;
av_log_set_level(AV_LOG_QUIET);
av_register_all();
// Open video file
Expand Down Expand Up @@ -408,7 +408,7 @@ long GetNumberVideoFrames(const char *file)
float fps(const char *filename)
{
float result = 0;
AVFormatContext *pFormatCtx;
AVFormatContext *pFormatCtx = NULL;

// Open video file
if (avformat_open_input(&pFormatCtx, filename, NULL, NULL))
Expand Down

0 comments on commit 85218a6

Please sign in to comment.