Change the read method of ffmpeg from filename to buffer to avoid

passing a filename with incorrect encoding to avformat_open_input.
Increased the size of photo thumbnails a little.
This commit is contained in:
codestation
2014-01-02 01:52:11 -04:30
parent 2f2d381474
commit e2768672e7
3 changed files with 55 additions and 4 deletions

View File

@@ -20,6 +20,7 @@
#ifndef AVDECODER_H
#define AVDECODER_H
#include <QFile>
#include <QImage>
#include <QString>
@@ -62,7 +63,11 @@ private:
void AVFrameToQImage(AVFrame &frame, QImage &image, int width, int height);
AVFrame *getDecodedFrame(AVCodecContext *pCodecCtx, int stream_index);
static int readFunction(void* opaque, uint8_t* buf, int buf_size);
static int64_t seekFunction(void* opaque, int64_t offset, int whence);
AVFormatContext *pFormatCtx;
QFile *file;
};
#endif // AVDECODER_H