mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
diff --git a/src/common/ffmpeg.cpp b/src/common/ffmpeg.cpp
|
|
index 0c2161ad..55e395b2 100644
|
|
--- a/src/common/ffmpeg.cpp
|
|
+++ b/src/common/ffmpeg.cpp
|
|
@@ -99,7 +99,7 @@ recording::MediaRet recording::MediaRecorder::setup_audio_stream()
|
|
if (!ast) return MRET_ERR_BUFSIZE;
|
|
ast->id = oc->nb_streams - 1;
|
|
// audio codec
|
|
- acodec = avcodec_find_encoder(fmt->audio_codec);
|
|
+ const AVCodec* acodec = avcodec_find_encoder(fmt->audio_codec);
|
|
if (!acodec) return MRET_ERR_NOCODEC;
|
|
// audio codec context
|
|
aenc = avcodec_alloc_context3(acodec);
|
|
@@ -254,7 +254,7 @@ recording::MediaRet recording::MediaRecorder::setup_video_stream(int width, int
|
|
st->id = oc->nb_streams - 1;
|
|
st->time_base = { 1, STREAM_FRAME_RATE };
|
|
// video codec
|
|
- vcodec = avcodec_find_encoder(fmt->video_codec);
|
|
+ const AVCodec* vcodec = avcodec_find_encoder(fmt->video_codec);
|
|
if (!vcodec) return MRET_ERR_FMTGUESS;
|
|
// codec context
|
|
enc = avcodec_alloc_context3(vcodec);
|
|
@@ -510,7 +510,7 @@ recording::MediaRet recording::MediaRecorder::setup_common(const char *fname)
|
|
{
|
|
avformat_alloc_output_context2(&oc, NULL, NULL, fname);
|
|
if (!oc) return MRET_ERR_BUFSIZE;
|
|
- fmt = oc->oformat;
|
|
+ const AVOutputFormat* fmt = oc->oformat;
|
|
return MRET_OK;
|
|
}
|
|
|
|
diff --git a/src/common/ffmpeg.h b/src/common/ffmpeg.h
|
|
index 1f981693..3bcbb588 100644
|
|
--- a/src/common/ffmpeg.h
|
|
+++ b/src/common/ffmpeg.h
|
|
@@ -20,6 +20,7 @@ extern "C" {
|
|
#define UINT64_C(c) (c ## ULL)
|
|
#endif
|
|
|
|
+#include <libavcodec/avcodec.h>
|
|
#include <libavformat/avformat.h>
|
|
#include <libavutil/avassert.h>
|
|
#include <libavutil/channel_layout.h>
|
|
|