Projects
Multimedia
MPlayer
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 5
View file
MPlayer.changes
Changed
@@ -1,4 +1,19 @@ ------------------------------------------------------------------- +Fri Jul 31 07:42:40 UTC 2026 - Manfred Hollstein <manfred.h@gmx.net> + +- Add two patches to allow building with ffmpeg-7/ffmpeg-8: + * ffmpeg-7.patch + * ffmpeg-8.patch + These have been taken from the build in Arch Linux at + <https://gitlab.archlinux.org/archlinux/packaging/packages/mplayer> + Thanks go to Bjørn Lie to point me at them! +- Modify ffmpeg related build requirements to fit with ffmpeg-8 +- Add "--disable-vdpau" due to current ffmpeg version +- Remove patch for libmpcodecs/ad_spdif.c and libmpdemux/muxer_lavf.c + from MPlayer.patch; removal of "const" for the *write* functions + is just plain wrong! + +------------------------------------------------------------------- Fri Oct 27 15:54:12 UTC 2023 - Bjørn Lie <zaitor@opensuse.org> - Add conditional termcap-devel BuildRequires, needed due to
View file
MPlayer.spec
Changed
@@ -50,13 +50,16 @@ Patch37: MPlayer-codec-cfg_optflags.patch Patch38: MPlayer-libopus_support.patch Patch39: MPlayer-linking_dvdread.patch - -BuildRequires: (pkgconfig(libavcodec) > 60 with pkgconfig(libavcodec) < 61) -BuildRequires: (pkgconfig(libavformat) > 60 with pkgconfig(libavformat) < 61) -BuildRequires: (pkgconfig(libavutil) > 58 with pkgconfig(libavutil) < 59) -BuildRequires: (pkgconfig(libswresample) > 4 with pkgconfig(libswresample) < 5) -BuildRequires: (pkgconfig(libswscale) > 7 with pkgconfig(libswscale) < 8) -BuildRequires: (pkgconfig(libpostproc) > 57 with pkgconfig(libpostproc) < 58) +# Fix build with ffmpeg 7, https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2024-April/074138.html +Patch40: ffmpeg-7.patch +# Fix build with ffmpeg 8, https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2025-May/074270.html +Patch41: ffmpeg-8.patch + +BuildRequires: (pkgconfig(libavcodec) >= 62 with pkgconfig(libavcodec) < 63) +BuildRequires: (pkgconfig(libavformat) >= 62 with pkgconfig(libavformat) < 63) +BuildRequires: (pkgconfig(libavutil) >= 60 with pkgconfig(libavutil) < 61) +BuildRequires: (pkgconfig(libswresample) >= 6 with pkgconfig(libswresample) < 7) +BuildRequires: (pkgconfig(libswscale) >= 9 with pkgconfig(libswscale) < 10) BuildRequires: ImageMagick BuildRequires: aalib-devel BuildRequires: docbook-xsl-stylesheets @@ -222,6 +225,7 @@ --enable-pulse \ --disable-openal \ --disable-qtx \ + --disable-vdpau \ --disable-win32dll \ %{nil} chmod 0755 ./version.sh
View file
MPlayer.patch
Changed
@@ -9,28 +9,6 @@ if (h > 0) sprintf(*(char **) arg, "%d:%02d:%02d", h, m, s); else if (m > 0) ---- a/libmpcodecs/ad_spdif.c -+++ b/libmpcodecs/ad_spdif.c -@@ -54,7 +54,7 @@ static int read_packet(void *p, uint8_t - return 0; - } - --static int write_packet(void *p, const uint8_t *buf, int buf_size) -+static int write_packet(void *p, uint8_t *buf, int buf_size) - { - int len; - struct spdifContext *ctx = p; ---- a/libmpdemux/muxer_lavf.c -+++ b/libmpdemux/muxer_lavf.c -@@ -77,7 +77,7 @@ const m_option_t lavfopts_conf = { - {NULL, NULL, 0, 0, 0, 0, NULL} - }; - --static int mp_write(void *opaque, const uint8_t *buf, int size) -+static int mp_write(void *opaque, uint8_t *buf, int size) - { - muxer_t *muxer = opaque; - return stream_write_buffer(muxer->stream, buf, size); --- a/libmenu/menu_console.c +++ b/libmenu/menu_console.c @@ -469,7 +469,7 @@ static int read_key(menu_t* menu,int c)
View file
ffmpeg-7.patch
Added
@@ -0,0 +1,94 @@ +diff -rup a/libao2/ao_jack.c b/libao2/ao_jack.c +--- a/libao2/ao_jack.c 2024-10-07 15:24:56.000000000 +0200 ++++ b/libao2/ao_jack.c 2026-07-31 09:38:13.741165716 +0200 +@@ -71,7 +71,7 @@ static volatile float callback_time = 0; + #define BUFFSIZE (NUM_CHUNKS * CHUNK_SIZE) + + //! buffer for audio data +-static AVFifoBuffer *buffer; ++static AVFifo *buffer; + + /** + * \brief insert len bytes into buffer +@@ -82,9 +82,10 @@ static AVFifoBuffer *buffer; + * If there is not enough room, the buffer is filled up + */ + static int write_buffer(unsigned char* data, int len) { +- int free = av_fifo_space(buffer); ++ int free = av_fifo_can_write(buffer); + if (len > free) len = free; +- return av_fifo_generic_write(buffer, data, len, NULL); ++ av_fifo_write(buffer, data, len); ++ return len; + } + + static void silence(float **bufs, int cnt, int num_bufs); +@@ -125,12 +126,12 @@ static void deinterleave(void *info, voi + */ + static int read_buffer(float **bufs, int cnt, int num_bufs) { + struct deinterleave di = {bufs, num_bufs, 0, 0}; +- int buffered = av_fifo_size(buffer); ++ int buffered = av_fifo_can_read(buffer); + if (cnt * sizeof(float) * num_bufs > buffered) { + silence(bufs, cnt, num_bufs); + cnt = buffered / sizeof(float) / num_bufs; + } +- av_fifo_generic_read(buffer, &di, cnt * num_bufs * sizeof(float), deinterleave); ++ av_fifo_read(buffer, &di, cnt * num_bufs * sizeof(float)); + return cnt; + } + +@@ -242,7 +243,7 @@ static int init(int rate, int channels, + mp_msg(MSGT_AO, MSGL_FATAL, "JACK cannot open server\n"); + goto err_out; + } +- buffer = av_fifo_alloc(BUFFSIZE); ++ buffer = av_fifo_alloc2(BUFFSIZE, 1, 0); + jack_set_process_callback(client, outputaudio, 0); + + // list matching ports if connections should be made +@@ -302,7 +303,7 @@ err_out: + free(client_name); + if (client) + jack_client_close(client); +- av_fifo_free(buffer); ++ av_fifo_freep2(&buffer); + buffer = NULL; + return 0; + } +@@ -315,7 +316,7 @@ static void uninit(int immed) { + reset(); + usec_sleep(100 * 1000); + jack_client_close(client); +- av_fifo_free(buffer); ++ av_fifo_freep2(&buffer); + buffer = NULL; + } + +@@ -324,7 +325,7 @@ static void uninit(int immed) { + */ + static void reset(void) { + paused = 1; +- av_fifo_reset(buffer); ++ av_fifo_reset2(buffer); + paused = 0; + } + +@@ -343,7 +344,7 @@ static void audio_resume(void) { + } + + static int get_space(void) { +- return av_fifo_space(buffer); ++ return av_fifo_can_write(buffer); + } + + /** +@@ -357,7 +358,7 @@ static int play(void *data, int len, int + } + + static float get_delay(void) { +- int buffered = av_fifo_size(buffer); // could be less ++ int buffered = av_fifo_can_read(buffer); // could be less + float in_jack = jack_latency; + if (estimate && callback_interval > 0) { + float elapsed = (float)GetTimer() / 1000000.0 - callback_time;
View file
ffmpeg-8.patch
Added
@@ -0,0 +1,221 @@ +diff -rup a/gui/util/bitmap.c b/gui/util/bitmap.c +--- a/gui/util/bitmap.c 2024-10-07 15:24:56.000000000 +0200 ++++ b/gui/util/bitmap.c 2026-07-31 09:39:42.767409460 +0200 +@@ -188,7 +188,6 @@ static int pngRead(const char *fname, gu + } + + avcodec_send_packet(avctx, NULL); // flush the decoder +- avcodec_close(avctx); + + av_frame_free(&frame); + av_packet_free(&pkt); +diff -rup a/libaf/af_lavcac3enc.c b/libaf/af_lavcac3enc.c +--- a/libaf/af_lavcac3enc.c 2024-10-07 15:24:56.000000000 +0200 ++++ b/libaf/af_lavcac3enc.c 2026-07-31 09:39:42.767542075 +0200 +@@ -100,8 +100,13 @@ static int control(struct af_instance_s + s->lavc_actx->sample_rate != af->data->rate || + s->lavc_actx->bit_rate != bit_rate) { + +- if (s->lavc_actx->codec) +- avcodec_close(s->lavc_actx); ++ avcodec_free_context(&s->lavc_actx); ++ s->lavc_actx = avcodec_alloc_context3(NULL); ++ if (!s->lavc_actx) { ++ mp_msg(MSGT_AFILTER, MSGL_ERR, MSGTR_CouldntAllocateLavcContext); ++ return AF_ERROR; ++ } ++ + + // Put sample parameters + s->lavc_actx->ch_layout.nb_channels = af->data->nch; +@@ -157,9 +162,7 @@ static void uninit(struct af_instance_s* + af_ac3enc_t *s = af->setup; + af->setup = NULL; + if(s->lavc_actx) { +- if (s->lavc_actx->codec) +- avcodec_close(s->lavc_actx); +- free(s->lavc_actx); ++ avcodec_free_context(&s->lavc_actx); + } + free(s->pending_data); + free(s); +@@ -280,12 +283,6 @@ static int af_open(af_instance_t* af){ + return AF_ERROR; + } + +- s->lavc_actx = avcodec_alloc_context3(NULL); +- if (!s->lavc_actx) { +- mp_msg(MSGT_AFILTER, MSGL_ERR, MSGTR_CouldntAllocateLavcContext); +- return AF_ERROR; +- } +- + return AF_OK; + } + +diff -rup a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c +--- a/libmpcodecs/ad_ffmpeg.c 2024-10-07 15:24:56.000000000 +0200 ++++ b/libmpcodecs/ad_ffmpeg.c 2026-07-31 09:39:42.767603637 +0200 +@@ -196,11 +196,9 @@ static void uninit(sh_audio_t *sh) + { + AVCodecContext *lavc_context = sh->context; + +- if (avcodec_close(lavc_context) < 0) +- mp_msg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_CantCloseCodec); + av_freep(&lavc_context->opaque); + av_freep(&lavc_context->extradata); +- av_freep(&lavc_context); ++ avcodec_free_context(&lavc_context); + } + + static int control(sh_audio_t *sh,int cmd,void* arg, ...) +diff -rup a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c +--- a/libmpcodecs/vd_ffmpeg.c 2026-07-31 09:39:07.048766305 +0200 ++++ b/libmpcodecs/vd_ffmpeg.c 2026-07-31 09:39:42.767686190 +0200 +@@ -514,9 +514,6 @@ static void uninit(sh_video_t *sh){ + } + + if (avctx) { +- if (avctx->codec && avcodec_close(avctx) < 0) +- mp_msg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_CantCloseCodec); +- + av_freep(&avctx->extradata); + av_freep(&avctx->hwaccel_context); + } +@@ -1063,8 +1060,8 @@ static mp_image_t *decode(sh_video_t *sh + // mpi->qscale = av_frame_get_qp_table(pic, &mpi->qstride, &mpi->qscale_type); + mpi->pict_type=pic->pict_type; + mpi->fields = MP_IMGFIELD_ORDERED; +- if(pic->interlaced_frame) mpi->fields |= MP_IMGFIELD_INTERLACED; +- if(pic->top_field_first ) mpi->fields |= MP_IMGFIELD_TOP_FIRST; ++ if(pic->flags & AV_FRAME_FLAG_INTERLACED) mpi->fields |= MP_IMGFIELD_INTERLACED; ++ if(pic->flags &AV_FRAME_FLAG_TOP_FIELD_FIRST ) mpi->fields |= MP_IMGFIELD_TOP_FIRST; + if(pic->repeat_pict == 1) mpi->fields |= MP_IMGFIELD_REPEAT_FIRST; + + return mpi; +diff -rup a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c +--- a/libmpcodecs/ve_lavc.c 2024-10-07 15:24:56.000000000 +0200 ++++ b/libmpcodecs/ve_lavc.c 2026-07-31 09:39:42.767857737 +0200 +@@ -152,7 +152,7 @@ static int lavc_param_video_global_heade + static int lavc_param_mv0_threshold = 256; + static int lavc_param_refs = 1; + static int lavc_param_b_sensitivity = 40; +-static int lavc_param_level = FF_LEVEL_UNKNOWN; ++static int lavc_param_level = AV_LEVEL_UNKNOWN; + + char *lavc_param_acodec = "mp2"; + int lavc_param_atag = 0; +@@ -722,12 +722,12 @@ static int put_image(struct vf_instance + + if(lavc_param_interlaced_dct){ + if((mpi->fields & MP_IMGFIELD_ORDERED) && (mpi->fields & MP_IMGFIELD_INTERLACED)) +- pic->top_field_first= !!(mpi->fields & MP_IMGFIELD_TOP_FIRST); ++ pic->flags |= (mpi->fields & MP_IMGFIELD_TOP_FIRST) ? AV_FRAME_FLAG_TOP_FIELD_FIRST : 0; + else +- pic->top_field_first= 1; ++ pic->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; + + if(lavc_param_top!=-1) +- pic->top_field_first= lavc_param_top; ++ pic->flags= (pic->flags & ~AV_FRAME_FLAG_TOP_FIELD_FIRST) | lavc_param_top ? AV_FRAME_FLAG_TOP_FIELD_FIRST : 0; + } + + return encode_frame(vf, pic, pts) >= 0; +@@ -852,9 +852,6 @@ static void uninit(struct vf_instance *v + av_freep(&lavc_venc_context->intra_matrix); + av_freep(&lavc_venc_context->inter_matrix); + +- if (lavc_venc_context->codec) +- avcodec_close(lavc_venc_context); +- + if(stats_file) fclose(stats_file); + + /* free rc_override */ +diff -rup a/libmpcodecs/vf_mcdeint.c b/libmpcodecs/vf_mcdeint.c +--- a/libmpcodecs/vf_mcdeint.c 2024-10-07 15:24:56.000000000 +0200 ++++ b/libmpcodecs/vf_mcdeint.c 2026-07-31 09:39:42.767929289 +0200 +@@ -313,8 +313,7 @@ static void uninit(struct vf_instance *v + } + #endif + if (vf->priv->avctx_enc) { +- avcodec_close(vf->priv->avctx_enc); +- av_freep(&vf->priv->avctx_enc); ++ avcodec_free_context(&vf->priv->avctx_enc); + } + + free(vf->priv->outbuf); +diff -rup a/libmpcodecs/vf_screenshot.c b/libmpcodecs/vf_screenshot.c +--- a/libmpcodecs/vf_screenshot.c 2024-10-07 15:24:56.000000000 +0200 ++++ b/libmpcodecs/vf_screenshot.c 2026-07-31 09:39:42.767972291 +0200 +@@ -279,8 +279,7 @@ static int query_format(struct vf_instan + + static void uninit(vf_instance_t *vf) + { +- avcodec_close(vf->priv->avctx); +- av_freep(&vf->priv->avctx); ++ avcodec_free_context(&vf->priv->avctx); + if(vf->priv->ctx) sws_freeContext(vf->priv->ctx); + av_freep(&vf->priv->pic->data0); + av_frame_free(&vf->priv->pic); +diff -rup a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c +--- a/libmpdemux/demux_lavf.c 2026-07-31 09:39:07.024399892 +0200 ++++ b/libmpdemux/demux_lavf.c 2026-07-31 09:40:36.579557004 +0200 +@@ -367,7 +367,10 @@ static void handle_stream(demuxer_t *dem + st->discard= AVDISCARD_ALL; + if (priv->audio_streams == 0) { + size_t rg_size; +- AVReplayGain *rg = (AVReplayGain*)av_stream_get_side_data(st, AV_PKT_DATA_REPLAYGAIN, &rg_size); ++ const AVPacketSideData *sd = av_packet_side_data_get(st->codecpar->coded_side_data, ++ st->codecpar->nb_coded_side_data, ++ AV_PKT_DATA_REPLAYGAIN); ++ AVReplayGain *rg = sd ? (AVReplayGain*)sd->data : NULL; + if (rg && rg_size >= sizeof(*rg)) { + priv->r_gain = rg->track_gain / 10000; + } +@@ -378,7 +381,10 @@ static void handle_stream(demuxer_t *dem + } + case AVMEDIA_TYPE_VIDEO:{ + AVDictionaryEntry *rot = av_dict_get(st->metadata, "rotate", NULL, 0); +- const int32_t *disp_matrix = (const int32_t *)av_stream_get_side_data(st, AV_PKT_DATA_DISPLAYMATRIX, NULL); ++ const AVPacketSideData *sd = av_packet_side_data_get(st->codecpar->coded_side_data, ++ st->codecpar->nb_coded_side_data, ++ AV_PKT_DATA_DISPLAYMATRIX); ++ const int32_t *disp_matrix = sd ? (const int32_t *)sd->data : NULL; + sh_video_t* sh_video; + BITMAPINFOHEADER *bih; + sh_video=new_sh_video_vid(demuxer, i, priv->video_streams); +diff -rup a/libvo/vo_png.c b/libvo/vo_png.c +--- a/libvo/vo_png.c 2024-10-07 15:24:56.000000000 +0200 ++++ b/libvo/vo_png.c 2026-07-31 09:39:42.768136227 +0200 +@@ -126,8 +126,7 @@ config(uint32_t width, uint32_t height, + + + if (avctx && png_format != format) { +- avcodec_close(avctx); +- av_freep(&avctx); ++ avcodec_free_context(&avctx); + } + + if (!avctx) { +@@ -214,8 +213,7 @@ query_format(uint32_t format)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.