Skip to content

Commit

Permalink
mytharchivehelper: Fix compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Harrison committed Dec 15, 2010
1 parent 3fe7f05 commit 0797b35
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mythplugins/mytharchive/mytharchivehelper/main.cpp
Expand Up @@ -1880,7 +1880,7 @@ static int grabThumbnail(QString inFile, QString thumbList, QString outFile, int
unsigned char *outputbuf = new unsigned char[bufflen];

int frameNo = -1, thumbCount = 0;
int frameFinished;
int frameFinished = 0;
int keyFrame;

while (av_read_frame(inputFC, &pkt) >= 0)
Expand All @@ -1893,7 +1893,7 @@ static int grabThumbnail(QString inFile, QString thumbList, QString outFile, int
thumbCount++;

avcodec_flush_buffers(codecCtx);
avcodec_decode_video(codecCtx, frame, &frameFinished, pkt.data, pkt.size);
avcodec_decode_video2(codecCtx, frame, &frameFinished, &pkt);
keyFrame = frame->key_frame;

while (!frameFinished || !keyFrame)
Expand All @@ -1905,7 +1905,7 @@ static int grabThumbnail(QString inFile, QString thumbList, QString outFile, int
if (pkt.stream_index == videostream)
{
frameNo++;
avcodec_decode_video(codecCtx, frame, &frameFinished, pkt.data, pkt.size);
avcodec_decode_video2(codecCtx, frame, &frameFinished, &pkt);
keyFrame = frame->key_frame;
}
}
Expand Down Expand Up @@ -1964,9 +1964,9 @@ static int grabThumbnail(QString inFile, QString thumbList, QString outFile, int
if (pkt.stream_index == videostream)
{
frameNo++;
avcodec_decode_video(codecCtx, frame,
avcodec_decode_video2(codecCtx, frame,
&frameFinished,
pkt.data, pkt.size);
&pkt);
}
}
}
Expand Down

0 comments on commit 0797b35

Please sign in to comment.