diff options
author | jbeich <jbeich@FreeBSD.org> | 2018-04-25 01:44:27 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2018-04-25 01:44:27 +0800 |
commit | 8191b1e984eb17f3e5ddc91f421a4798e5ee3903 (patch) | |
tree | dd7fca77e451ccae161d9afc9eaa78d1e419bd48 /emulators | |
parent | 07f915c735231c5457330eddb58f51fa8665eb05 (diff) | |
download | freebsd-ports-gnome-8191b1e984eb17f3e5ddc91f421a4798e5ee3903.tar.gz freebsd-ports-gnome-8191b1e984eb17f3e5ddc91f421a4798e5ee3903.tar.zst freebsd-ports-gnome-8191b1e984eb17f3e5ddc91f421a4798e5ee3903.zip |
emulators/vice: unbreak with ffmpeg 4.0
ffmpegdrv.c:363:34: error: use of undeclared identifier 'CODEC_CAP_VARIABLE_FRAME_SIZE'
if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) {
^
ffmpegdrv.c:457:21: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER'
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
^
ffmpegdrv.c:790:21: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER'
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
^
ffmpegdrv.c:970:40: error: use of undeclared identifier 'AVFMT_RAWPICTURE'
if (ffmpegdrv_oc->oformat->flags & AVFMT_RAWPICTURE) {
^
PR: 227726
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/vice/files/patch-src_gfxoutputdrv_ffmpegdrv.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/emulators/vice/files/patch-src_gfxoutputdrv_ffmpegdrv.c b/emulators/vice/files/patch-src_gfxoutputdrv_ffmpegdrv.c new file mode 100644 index 000000000000..1a4c94daee7a --- /dev/null +++ b/emulators/vice/files/patch-src_gfxoutputdrv_ffmpegdrv.c @@ -0,0 +1,61 @@ +ffmpegdrv.c:363:34: error: use of undeclared identifier 'CODEC_CAP_VARIABLE_FRAME_SIZE' + if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) { + ^ +ffmpegdrv.c:457:21: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER' + c->flags |= CODEC_FLAG_GLOBAL_HEADER; + ^ +ffmpegdrv.c:790:21: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER' + c->flags |= CODEC_FLAG_GLOBAL_HEADER; + ^ +ffmpegdrv.c:970:40: error: use of undeclared identifier 'AVFMT_RAWPICTURE' + if (ffmpegdrv_oc->oformat->flags & AVFMT_RAWPICTURE) { + ^ + +--- src/gfxoutputdrv/ffmpegdrv.c.orig 2017-03-30 20:32:40 UTC ++++ src/gfxoutputdrv/ffmpegdrv.c +@@ -360,7 +360,7 @@ static int ffmpegdrv_open_audio(AVFormatContext *oc, A + } + + audio_is_open = 1; +- if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) { ++ if (c->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) { + audio_inbuf_samples = 10000; + } else { + audio_inbuf_samples = c->frame_size; +@@ -454,7 +454,7 @@ static int ffmpegmovie_init_audio(int speed, int chann + + /* Some formats want stream headers to be separate. */ + if (ffmpegdrv_oc->oformat->flags & AVFMT_GLOBALHEADER) +- c->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + + /* create resampler context */ + #ifndef HAVE_FFMPEG_AVRESAMPLE +@@ -787,7 +787,7 @@ static void ffmpegdrv_init_video(screenshot_t *screens + + /* Some formats want stream headers to be separate. */ + if (ffmpegdrv_oc->oformat->flags & AVFMT_GLOBALHEADER) { +- c->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + } + + if (audio_init_done) { +@@ -967,6 +967,7 @@ static int ffmpegdrv_record(screenshot_t *screenshot) + + video_st.frame->pts = video_st.next_pts++; + ++#ifdef AVFMT_RAWPICTURE + if (ffmpegdrv_oc->oformat->flags & AVFMT_RAWPICTURE) { + AVPacket pkt; + VICE_P_AV_INIT_PACKET(&pkt); +@@ -977,7 +978,9 @@ static int ffmpegdrv_record(screenshot_t *screenshot) + pkt.pts = pkt.dts = video_st.frame->pts; + + ret = VICE_P_AV_INTERLEAVED_WRITE_FRAME(ffmpegdrv_oc, &pkt); +- } else { ++ } else ++#endif ++ { + AVPacket pkt = { 0 }; + int got_packet; + |