Skip to content

Commit

Permalink
build error for old ffmpeg.
Browse files Browse the repository at this point in the history
avpicture_fill 2nd is not const in some versions.
  • Loading branch information
wang-bin committed Mar 10, 2014
1 parent 305c3ce commit c94dbb8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/AudioFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
#include "QtAV/AudioFrame.h"
#include "private/Frame_p.h"
#include "QtAV/AudioResampler.h"
#include "QtAV/QtAV_Compat.h"

extern "C" {
#include <libavutil/samplefmt.h>
}

namespace QtAV {

Expand Down
2 changes: 1 addition & 1 deletion src/ImageConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ bool ImageConverter::prepareData()
//picture的数据按PIX_FMT格式自动"关联"到 data
avpicture_fill(
&d.picture,
(const uint8_t*)d.data_out.constData(),
(uint8_t*)d.data_out.constData(),
(AVPixelFormat)d.fmt_out,
d.w_out,
d.h_out
Expand Down
2 changes: 1 addition & 1 deletion src/VideoFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ void VideoFrame::init()
AVPixelFormat fff = (AVPixelFormat)d->format.pixelFormatFFmpeg();
//int bytes = avpicture_get_size(fff, width(), height());
//d->data.resize(bytes);
avpicture_fill(&picture, (const uint8_t*)d->data.constData(), fff, width(), height());
avpicture_fill(&picture, (uint8_t*)d->data.constData(), fff, width(), height());
setBits(picture.data);
setBytesPerLine(picture.linesize);
}
Expand Down

0 comments on commit c94dbb8

Please sign in to comment.