diff --git a/mythplugins/mytharchive/mytharchive/thumbfinder.cpp b/mythplugins/mytharchive/mytharchive/thumbfinder.cpp
index b90c69c..87b7b57 100644
a
|
b
|
|
56 | 56 | #include <mythimage.h> |
57 | 57 | #include <mythconfig.h> |
58 | 58 | |
| 59 | extern "C" { |
| 60 | #include "libavutil/imgutils.h" |
| 61 | } |
| 62 | |
59 | 63 | #ifndef INT64_C // Used in FFmpeg headers to define some constants |
60 | 64 | #define INT64_C(v) (v ## LL) |
61 | 65 | #endif |
… |
… |
bool ThumbFinder::seekBackward() |
788 | 792 | bool ThumbFinder::getFrameImage(bool needKeyFrame, int64_t requiredPTS) |
789 | 793 | { |
790 | 794 | AVPacket pkt; |
791 | | AVPicture orig; |
792 | | AVPicture retbuf; |
793 | | memset(&orig, 0, sizeof(AVPicture)); |
794 | | memset(&retbuf, 0, sizeof(AVPicture)); |
| 795 | AVFrame orig; |
| 796 | AVFrame retbuf; |
| 797 | memset(&orig, 0, sizeof(AVFrame)); |
| 798 | memset(&retbuf, 0, sizeof(AVFrame)); |
795 | 799 | |
796 | 800 | av_init_packet(&pkt); |
797 | 801 | |
… |
… |
bool ThumbFinder::getFrameImage(bool needKeyFrame, int64_t requiredPTS) |
840 | 844 | |
841 | 845 | if (frameFinished) |
842 | 846 | { |
843 | | avpicture_fill(&retbuf, m_outputbuf, AV_PIX_FMT_RGB32, m_frameWidth, m_frameHeight); |
844 | | AVPicture *tmp = m_frame; |
| 847 | // avpicture_fill(&retbuf, m_outputbuf, AV_PIX_FMT_RGB32, m_frameWidth, m_frameHeight); |
| 848 | av_image_fill_arrays(retbuf.data, retbuf.linesize, m_outputbuf, |
| 849 | AV_PIX_FMT_RGB32, m_frameWidth, m_frameHeight, IMAGE_ALIGN); |
| 850 | AVFrame *tmp = m_frame; |
845 | 851 | |
846 | 852 | m_deinterlacer->DeinterlaceSingle(tmp, tmp); |
847 | 853 | |
diff --git a/mythplugins/mytharchive/mytharchivehelper/main.cpp b/mythplugins/mytharchive/mytharchivehelper/main.cpp
index 8f6fd77..bff6693 100644
a
|
b
|
extern "C" { |
71 | 71 | #include <libavcodec/avcodec.h> |
72 | 72 | #include <libavformat/avformat.h> |
73 | 73 | #include "external/pxsup2dast.h" |
| 74 | #include "libavutil/imgutils.h" |
74 | 75 | } |
75 | 76 | |
76 | 77 | // mytharchive headers |
… |
… |
static int grabThumbnail(QString inFile, QString thumbList, QString outFile, int |
1634 | 1635 | return 1; |
1635 | 1636 | } |
1636 | 1637 | AVPacket pkt; |
1637 | | AVPicture orig; |
1638 | | AVPicture retbuf; |
1639 | | memset(&orig, 0, sizeof(AVPicture)); |
1640 | | memset(&retbuf, 0, sizeof(AVPicture)); |
| 1638 | AVFrame orig; |
| 1639 | AVFrame retbuf; |
| 1640 | memset(&orig, 0, sizeof(AVFrame)); |
| 1641 | memset(&retbuf, 0, sizeof(AVFrame)); |
1641 | 1642 | MythAVCopy copyframe; |
1642 | 1643 | MythPictureDeinterlacer deinterlacer(codecCtx->pix_fmt, width, height); |
1643 | 1644 | |
… |
… |
static int grabThumbnail(QString inFile, QString thumbList, QString outFile, int |
1693 | 1694 | else if (filename.contains("%1")) |
1694 | 1695 | filename = filename.arg(thumbCount); |
1695 | 1696 | |
1696 | | avpicture_fill(&retbuf, outputbuf, |
1697 | | AV_PIX_FMT_RGB32, width, height); |
| 1697 | // avpicture_fill(&retbuf, outputbuf, |
| 1698 | // AV_PIX_FMT_RGB32, width, height); |
| 1699 | av_image_fill_arrays(retbuf.data, retbuf.linesize, outputbuf, |
| 1700 | AV_PIX_FMT_RGB32, width, height, IMAGE_ALIGN); |
1698 | 1701 | |
1699 | 1702 | AVFrame *tmp = frame; |
1700 | | deinterlacer.DeinterlaceSingle((AVPicture*)tmp, |
1701 | | (AVPicture*)tmp); |
| 1703 | deinterlacer.DeinterlaceSingle((AVFrame*)tmp, |
| 1704 | (AVFrame*)tmp); |
1702 | 1705 | |
1703 | 1706 | copyframe.Copy(&retbuf, AV_PIX_FMT_RGB32, |
1704 | | (AVPicture*) tmp, |
| 1707 | (AVFrame*) tmp, |
1705 | 1708 | codecCtx->pix_fmt, width, height); |
1706 | 1709 | |
1707 | 1710 | QImage img(outputbuf, width, height, |