1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
--- gmic-1.5.0.7/src/CImg.h.orig
+++ gmic-1.5.0.7/src/CImg.h
@@ -310,6 +310,7 @@
extern "C" {
#include "avformat.h"
#include "avcodec.h"
+#include "libavutil/mathematics.h"
#include "swscale.h"
}
#endif
@@ -41744,7 +41745,7 @@
// as a vector 1x4 containing : (nb_frames,width,height,fps).
if (!first_frame && !last_frame && !step_frame) {
for (vstream = 0; vstream<(int)(format_ctx->nb_streams); ++vstream)
- if (format_ctx->streams[vstream]->codec->codec_type==CODEC_TYPE_VIDEO) break;
+ if (format_ctx->streams[vstream]->codec->codec_type==AVMEDIA_TYPE_VIDEO) break;
if (vstream==(int)format_ctx->nb_streams) assign();
else {
CImgList<doubleT> timestamps;
@@ -41774,7 +41775,7 @@
}
for (vstream = 0; vstream<(int)(format_ctx->nb_streams) &&
- format_ctx->streams[vstream]->codec->codec_type!=CODEC_TYPE_VIDEO; ) ++vstream;
+ format_ctx->streams[vstream]->codec->codec_type!=AVMEDIA_TYPE_VIDEO; ) ++vstream;
if (vstream==(int)format_ctx->nb_streams) {
av_close_input_file(format_ctx); format_ctx = 0;
return load_ffmpeg_external(filename);
@@ -42350,7 +42351,7 @@
AVCodecContext *c = video_str->codec;
c->codec_id = fmt->video_codec;
- c->codec_type = CODEC_TYPE_VIDEO;
+ c->codec_type = AVMEDIA_TYPE_VIDEO;
c->bit_rate = 1024*bitrate;
c->width = frame_dimx;
c->height = frame_dimy;
@@ -42510,7 +42511,7 @@
AVPacket pkt;
av_init_packet(&pkt);
pkt.pts = av_rescale_q(c->coded_frame->pts,c->time_base,video_str->time_base);
- if (c->coded_frame->key_frame) pkt.flags|=PKT_FLAG_KEY;
+ if (c->coded_frame->key_frame) pkt.flags|=AV_PKT_FLAG_KEY;
pkt.stream_index = video_str->index;
pkt.data = video_outbuf;
pkt.size = out_size;
|