Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 May 2018 11:40:30 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r469017 - in head/multimedia/miro: . files
Message-ID:  <201805041140.w44BeUJG053862@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri May  4 11:40:30 2018
New Revision: 469017
URL: https://svnweb.freebsd.org/changeset/ports/469017

Log:
  multimedia/miro: unbreak with ffmpeg 4.0
  
  linux/miro-segmenter.c:103:48: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER'
                  output_codec_context->flags |= CODEC_FLAG_GLOBAL_HEADER;
                                                 ^
  linux/miro-segmenter.c:270:46: error: no member named 'pts' in 'struct AVStream'
              segment_time = (double)video_st->pts.val * video_st->time_base.num / video_st->time_base.den;
                                     ~~~~~~~~  ^
  linux/miro-segmenter.c:273:46: error: no member named 'pts' in 'struct AVStream'
              segment_time = (double)audio_st->pts.val * audio_st->time_base.num / audio_st->time_base.den;
                                     ~~~~~~~~  ^
  
  PR:		227726
  Reported by:	antoine (via exp-run)

Modified:
  head/multimedia/miro/Makefile   (contents, props changed)
  head/multimedia/miro/files/patch-linux_miro-segmenter.c   (contents, props changed)

Modified: head/multimedia/miro/Makefile
==============================================================================
--- head/multimedia/miro/Makefile	Fri May  4 11:40:14 2018	(r469016)
+++ head/multimedia/miro/Makefile	Fri May  4 11:40:30 2018	(r469017)
@@ -13,8 +13,6 @@ COMMENT=	Video player to get internet TV broadcasts
 
 LICENSE=	GPLv2
 
-BROKEN=		fails to build with ffmpeg 4.0
-
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pyrex>0:devel/pyrex@${FLAVOR} \
 		${PYTHON_SITELIBDIR}/webkit/__init__.py:www/py-webkitgtk@${FLAVOR} \
 		update-mime-database:misc/shared-mime-info \

Modified: head/multimedia/miro/files/patch-linux_miro-segmenter.c
==============================================================================
--- head/multimedia/miro/files/patch-linux_miro-segmenter.c	Fri May  4 11:40:14 2018	(r469016)
+++ head/multimedia/miro/files/patch-linux_miro-segmenter.c	Fri May  4 11:40:30 2018	(r469017)
@@ -23,3 +23,34 @@
                  output_codec_context->block_align = 0;
              }
              else {
+@@ -92,7 +100,11 @@ static AVStream *add_output_stream(AVFormatContext *ou
+             output_codec_context->has_b_frames = input_codec_context->has_b_frames;
+ 
+             if (output_format_context->oformat->flags & AVFMT_GLOBALHEADER) {
++#if LIBAVCODEC_VERSION_MAJOR > 57
++                output_codec_context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
++#else
+                 output_codec_context->flags |= CODEC_FLAG_GLOBAL_HEADER;
++#endif
+             }
+             break;
+     default:
+@@ -259,10 +271,18 @@ int main(int argc, char **argv)
+ #else
+         if (packet.stream_index == video_index && (packet.flags & PKT_FLAG_KEY)) {
+ #endif
++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(55,40,100)
++            segment_time = (double)av_stream_get_end_pts(video_st) * video_st->time_base.num / video_st->time_base.den;
++#else
+             segment_time = (double)video_st->pts.val * video_st->time_base.num / video_st->time_base.den;
++#endif
+         }
+         else if (video_index < 0) {
++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(55,40,100)
++            segment_time = (double)av_stream_get_end_pts(audio_st) * audio_st->time_base.num / audio_st->time_base.den;
++#else
+             segment_time = (double)audio_st->pts.val * audio_st->time_base.num / audio_st->time_base.den;
++#endif
+         }
+         else {
+             segment_time = prev_segment_time;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805041140.w44BeUJG053862>