On Thu, Aug 13, 2020 at 09:50:21AM -0600, Tracey Emery wrote:
> Hello,
> 
> The following updates pianobar from 2017.08.30 to 2020.04.05. This
> removes two patches. There are no symbol changes, so no lib bumps.
> 
> My quickmix station disappeared this morning, so not sure what happened.
> Running on 2020.04.05 fixes this and is currently playing fine on amd64.
> 
> Ok?
> 
> -- 
> 
> Tracey Emery
> 

Ping.
Diff reattached.

-- 

Tracey Emery

diff 9ebbd605bc3db6c1baf4b8f4a5e29b85941dbc0b /usr/ports/mystuff
blob - cb1cd1d0a4f48e1af62773b468d4e4f4aef12529
file + audio/pianobar/Makefile
--- audio/pianobar/Makefile
+++ audio/pianobar/Makefile
@@ -2,8 +2,7 @@
 
 COMMENT =      command-line client for Pandora Internet Radio
 
-DISTNAME =     pianobar-2017.08.30
-REVISION =     1
+DISTNAME =     pianobar-2020.04.05
 EXTRACT_SUFX = .tar.bz2
 CATEGORIES =   audio
 
blob - 53a3557a954c1a524ec390cef810828556e73e1d
file + audio/pianobar/distinfo
--- audio/pianobar/distinfo
+++ audio/pianobar/distinfo
@@ -1,2 +1,2 @@
-SHA256 (pianobar-2017.08.30.tar.bz2) = 
7BTbbPGn28HYGQtcoNJWAh6XBYe82usjkE1LynGgRnQ=
-SIZE (pianobar-2017.08.30.tar.bz2) = 46664
+SHA256 (pianobar-2020.04.05.tar.bz2) = 
bBc7aynMwfQy4AE/tCXo+ctCYVObWNNE4LInSWNyZIA=
+SIZE (pianobar-2020.04.05.tar.bz2) = 48823
blob - 0358051ac2129795be6f1c1ad1f5b7905062dc36
file + /dev/null
--- audio/pianobar/patches/patch-src_player_c
+++ audio/pianobar/patches/patch-src_player_c
@@ -1,242 +0,0 @@
-$OpenBSD: patch-src_player_c,v 1.23 2019/02/18 10:05:39 ajacoutot Exp $
-
-- XXX Revert:
-  commit f3dff6792232d1e3f2deb8baf21dc1fa81581090
-  Author: Lars-Dominik Braun <[email protected]>
-  Date:   Fri Mar 24 10:02:27 2017
-
-  Replace deprecated avcodec_decode_audio4
-
-  Use new send_packet/receive_frame API.
-- Remove deprecated header avfiltergraph.h
-
-Index: src/player.c
---- src/player.c.orig
-+++ src/player.c
-@@ -36,7 +36,6 @@ THE SOFTWARE.
- #include <libavcodec/avcodec.h>
- #include <libavutil/avutil.h>
- #include <libavfilter/avfilter.h>
--#include <libavfilter/avfiltergraph.h>
- #include <libavfilter/buffersink.h>
- #include <libavfilter/buffersrc.h>
- #ifdef HAVE_LIBAVFILTER_AVCODEC_H
-@@ -166,23 +165,16 @@ static bool openStream (player_t * const player) {
-       }
- 
-       player->st = player->fctx->streams[player->streamIdx];
-+      AVCodecContext * const cctx = player->st->codec;
-       player->st->discard = AVDISCARD_DEFAULT;
- 
-       /* decoder setup */
--      if ((player->cctx = avcodec_alloc_context3 (NULL)) == NULL) {
--              softfail ("avcodec_alloc_context3");
--      }
--      const AVCodecParameters * const cp = player->st->codecpar;
--      if ((ret = avcodec_parameters_to_context (player->cctx, cp)) < 0) {
--              softfail ("avcodec_parameters_to_context");
--      }
--
--      AVCodec * const decoder = avcodec_find_decoder (cp->codec_id);
-+      AVCodec * const decoder = avcodec_find_decoder (cctx->codec_id);
-       if (decoder == NULL) {
-               softfail ("find_decoder");
-       }
- 
--      if ((ret = avcodec_open2 (player->cctx, decoder, NULL)) < 0) {
-+      if ((ret = avcodec_open2 (cctx, decoder, NULL)) < 0) {
-               softfail ("codec_open2");
-       }
- 
-@@ -203,7 +195,7 @@ static bool openFilter (player_t * const player) {
-       /* filter setup */
-       char strbuf[256];
-       int ret = 0;
--      AVCodecParameters * const cp = player->st->codecpar;
-+      AVCodecContext * const cctx = player->st->codec;
- 
-       if ((player->fgraph = avfilter_graph_alloc ()) == NULL) {
-               softfail ("graph_alloc");
-@@ -212,11 +204,17 @@ static bool openFilter (player_t * const player) {
-       /* abuffer */
-       AVRational time_base = player->st->time_base;
- 
-+      /* Workaround for a bug in libav-11, which reports an invalid channel
-+       * layout mp3 files */
-+      if (cctx->channel_layout == 0) {
-+              cctx->channel_layout = av_get_default_channel_layout 
(cctx->channels);
-+      }
-+
-       snprintf (strbuf, sizeof (strbuf),
-                       
"time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%"PRIx64, 
--                      time_base.num, time_base.den, cp->sample_rate,
--                      av_get_sample_fmt_name (player->cctx->sample_fmt),
--                      cp->channel_layout);
-+                      time_base.num, time_base.den, cctx->sample_rate,
-+                      av_get_sample_fmt_name (cctx->sample_fmt),
-+                      cctx->channel_layout);
-       if ((ret = avfilter_graph_create_filter (&player->fabuf,
-                       avfilter_get_by_name ("abuffer"), NULL, strbuf, NULL,
-                       player->fgraph)) < 0) {
-@@ -264,14 +262,14 @@ static bool openFilter (player_t * const player) {
- /*    setup libao
-  */
- static bool openDevice (player_t * const player) {
--      const AVCodecParameters * const cp = player->st->codecpar;
-+      AVCodecContext * const cctx = player->st->codec;
- 
-       ao_sample_format aoFmt;
-       memset (&aoFmt, 0, sizeof (aoFmt));
-       aoFmt.bits = av_get_bytes_per_sample (avformat) * 8;
-       assert (aoFmt.bits > 0);
--      aoFmt.channels = cp->channels;
--      aoFmt.rate = cp->sample_rate;
-+      aoFmt.channels = cctx->channels;
-+      aoFmt.rate = cctx->sample_rate;
-       aoFmt.byte_format = AO_FMT_NATIVE;
- 
-       int driver = ao_default_driver_id ();
-@@ -289,7 +287,6 @@ static int play (player_t * const player) {
-       assert (player != NULL);
- 
-       AVPacket pkt;
--      AVCodecContext * const cctx = player->cctx;
-       av_init_packet (&pkt);
-       pkt.data = NULL;
-       pkt.size = 0;
-@@ -300,28 +297,18 @@ static int play (player_t * const player) {
-       filteredFrame = av_frame_alloc ();
-       assert (filteredFrame != NULL);
- 
--      enum { FILL, DRAIN, DONE } drainMode = FILL;
--      int ret = 0;
--      while (!player->doQuit && drainMode != DONE) {
--              if (drainMode == FILL) {
--                      ret = av_read_frame (player->fctx, &pkt);
--                      if (ret == AVERROR_EOF) {
--                              /* enter drain mode */
--                              drainMode = DRAIN;
--                              avcodec_send_packet (cctx, NULL);
--                      } else if (pkt.stream_index != player->streamIdx) {
--                              /* unused packet */
--                              av_packet_unref (&pkt);
--                              continue;
--                      } else if (ret < 0) {
--                              /* error, abort */
--                              break;
--                      } else {
--                              /* fill buffer */
--                              avcodec_send_packet (cctx, &pkt);
--                      }
-+      while (!player->doQuit) {
-+              int ret = av_read_frame (player->fctx, &pkt);
-+              if (ret < 0) {
-+                      av_free_packet (&pkt);
-+                      return ret;
-+              } else if (pkt.stream_index != player->streamIdx) {
-+                      av_free_packet (&pkt);
-+                      continue;
-               }
- 
-+              AVPacket pkt_orig = pkt;
-+
-               /* pausing */
-               pthread_mutex_lock (&player->pauseMutex);
-               if (player->doPause) {
-@@ -333,50 +320,54 @@ static int play (player_t * const player) {
-               }
-               pthread_mutex_unlock (&player->pauseMutex);
- 
--              while (!player->doQuit) {
--                      ret = avcodec_receive_frame (cctx, frame);
--                      if (ret == AVERROR_EOF) {
--                              /* done draining */
--                              drainMode = DONE;
-+              while (pkt.size > 0 && !player->doQuit) {
-+                      int got_frame = 0;
-+
-+                      const int decoded = avcodec_decode_audio4 
(player->st->codec,
-+                                      frame, &got_frame, &pkt);
-+                      if (decoded < 0) {
-+                              /* skip this one */
-                               break;
--                      } else if (ret != 0) {
--                              /* no more output */
--                              break;
-                       }
- 
--                      /* XXX: suppresses warning from resample filter */
--                      if (frame->pts == (int64_t) AV_NOPTS_VALUE) {
--                              frame->pts = 0;
--                      }
--                      ret = av_buffersrc_write_frame (player->fabuf, frame);
--                      assert (ret >= 0);
--
--                      while (true) {
--                              if (av_buffersink_get_frame (player->fbufsink, 
filteredFrame) < 0) {
--                                      /* try again next frame */
--                                      break;
-+                      if (got_frame != 0) {
-+                              /* XXX: suppresses warning from resample filter 
*/
-+                              if (frame->pts == (int64_t) AV_NOPTS_VALUE) {
-+                                      frame->pts = 0;
-                               }
-+                              ret = av_buffersrc_write_frame (player->fabuf, 
frame);
-+                              assert (ret >= 0);
- 
--                              const int numChannels = 
av_get_channel_layout_nb_channels (
--                                              filteredFrame->channel_layout);
--                              const int bps = 
av_get_bytes_per_sample(filteredFrame->format);
--                              ao_play (player->aoDev, (char *) 
filteredFrame->data[0],
--                                              filteredFrame->nb_samples * 
numChannels * bps);
-+                              while (true) {
-+                                      if (av_buffersink_get_frame 
(player->fbufsink, filteredFrame) < 0) {
-+                                              /* try again next frame */
-+                                              break;
-+                                      }
- 
--                              av_frame_unref (filteredFrame);
-+                                      const int numChannels = 
av_get_channel_layout_nb_channels (
-+                                                      
filteredFrame->channel_layout);
-+                                      const int bps = 
av_get_bytes_per_sample(filteredFrame->format);
-+                                      ao_play (player->aoDev, (char *) 
filteredFrame->data[0],
-+                                                      
filteredFrame->nb_samples * numChannels * bps);
-+
-+                                      av_frame_unref (filteredFrame);
-+                              }
-                       }
--              }
- 
-+                      pkt.data += decoded;
-+                      pkt.size -= decoded;
-+              };
-+
-+              av_free_packet (&pkt_orig);
-+
-               player->songPlayed = av_q2d (player->st->time_base) * (double) 
pkt.pts;
-               player->lastTimestamp = pkt.pts;
--
--              av_packet_unref (&pkt);
-       }
- 
-       av_frame_free (&filteredFrame);
-       av_frame_free (&frame);
- 
--      return ret;
-+      return 0;
- }
- 
- static void finish (player_t * const player) {
-@@ -386,9 +377,9 @@ static void finish (player_t * const player) {
-               avfilter_graph_free (&player->fgraph);
-               player->fgraph = NULL;
-       }
--      if (player->cctx != NULL) {
--              avcodec_close (player->cctx);
--              player->cctx = NULL;
-+      if (player->st != NULL && player->st->codec != NULL) {
-+              avcodec_close (player->st->codec);
-+              player->st = NULL;
-       }
-       if (player->fctx != NULL) {
-               avformat_close_input (&player->fctx);
blob - 769a32b5150254e0ef75ffadaa210e44da5bcab7
file + /dev/null
--- audio/pianobar/patches/patch-src_player_h
+++ audio/pianobar/patches/patch-src_player_h
@@ -1,15 +0,0 @@
-$OpenBSD: patch-src_player_h,v 1.3 2019/02/18 10:05:39 ajacoutot Exp $
-
-Remove deprecated header avfiltergraph.h
-
-Index: src/player.h
---- src/player.h.orig
-+++ src/player.h
-@@ -34,7 +34,6 @@ THE SOFTWARE.
- #include <ao/ao.h>
- #include <libavformat/avformat.h>
- #include <libavfilter/avfilter.h>
--#include <libavfilter/avfiltergraph.h>
- #include <piano.h>
- 
- #include "settings.h"

Reply via email to