Added a bunch of warning flags and fixed most of the shadowed

variables.
This commit is contained in:
codestation
2015-02-27 22:59:22 -04:30
parent ddf9b4a611
commit 60a3049391
37 changed files with 380 additions and 362 deletions

View File

@@ -142,7 +142,7 @@ QByteArray AVDecoder::getAudioThumbnail(int width, int height)
return data;
}
AVFrame *AVDecoder::getDecodedFrame(AVCodecContext *pCodecCtx, int stream_index)
AVFrame *AVDecoder::getDecodedFrame(AVCodecContext *codec_ctx, int frame_stream_index)
{
AVFrame *pFrame = avcodec_alloc_frame();
@@ -150,8 +150,8 @@ AVFrame *AVDecoder::getDecodedFrame(AVCodecContext *pCodecCtx, int stream_index)
int frame_finished = 0;
while(!frame_finished && av_read_frame(pFormatCtx, &packet)>=0) {
if(packet.stream_index == stream_index) {
avcodec_decode_video2(pCodecCtx, pFrame, &frame_finished, &packet);
if(packet.stream_index == frame_stream_index) {
avcodec_decode_video2(codec_ctx, pFrame, &frame_finished, &packet);
}
av_free_packet(&packet);
}