diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-11-27 19:16:57 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-11-27 19:16:57 +0200 |
commit | 712471307fc6b669abe93b4d2421d060b92cb2e2 (patch) | |
tree | 5a3945c4ed3775d3ffba5c2bd230129bad6d2e79 /main/ffmpeg | |
parent | 3802d7203f4302edf47208793f81c2e960546e4d (diff) | |
download | aports-712471307fc6b669abe93b4d2421d060b92cb2e2.tar.bz2 aports-712471307fc6b669abe93b4d2421d060b92cb2e2.tar.xz |
main/ffmpeg: fix mpegts encoder cbr calculations
Diffstat (limited to 'main/ffmpeg')
-rw-r--r-- | main/ffmpeg/APKBUILD | 15 | ||||
-rw-r--r-- | main/ffmpeg/fix-mpegtsenc-cbr-scaling.patch | 20 |
2 files changed, 30 insertions, 5 deletions
diff --git a/main/ffmpeg/APKBUILD b/main/ffmpeg/APKBUILD index 539974444b..5b61d53683 100644 --- a/main/ffmpeg/APKBUILD +++ b/main/ffmpeg/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=ffmpeg pkgver=2.8.2 -pkgrel=0 +pkgrel=1 pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix" url="http://ffmpeg.org/" arch="all" @@ -15,7 +15,9 @@ makedepends="gnutls-dev lame-dev libvorbis-dev xvidcore-dev zlib-dev depends= source="http://ffmpeg.org/releases/ffmpeg-$pkgver.tar.bz2 configure-dlvsym.patch - fix-flv-extradata.patch" + fix-flv-extradata.patch + fix-mpegtsenc-cbr-scaling.patch + " _builddir="$srcdir"/$pkgname-$pkgver prepare() { @@ -84,10 +86,13 @@ libs() { md5sums="99f31723326dfe1bfd1bc7521338f2d2 ffmpeg-2.8.2.tar.bz2 d041c60890392d80f74a567523f4c54d configure-dlvsym.patch -5f39e099cd7dfe71bb2f6b6615623d67 fix-flv-extradata.patch" +5f39e099cd7dfe71bb2f6b6615623d67 fix-flv-extradata.patch +9861cd786636500c2f28bd759bbea0e2 fix-mpegtsenc-cbr-scaling.patch" sha256sums="830ec647f7ad774fc0caf17ba47774bf5dee7a89cbd65894f364a87ba3ad21b2 ffmpeg-2.8.2.tar.bz2 ffd6beadaea4cdbc1326fe396d8cd34b3efb791a865a32f64b3fe998b679c1d0 configure-dlvsym.patch -8324bd3e154c151e64df36afd1edf05b8dc2dcd8e520208be0355a34b4209ad5 fix-flv-extradata.patch" +8324bd3e154c151e64df36afd1edf05b8dc2dcd8e520208be0355a34b4209ad5 fix-flv-extradata.patch +2724a333a96c24a77de8302228d8dde4679be3616ad2426cb3a3aa645135c73b fix-mpegtsenc-cbr-scaling.patch" sha512sums="15c1c09d7d4bb8cc7babff4c782e4bf6621ed86d6b02bffb5468bdcd294a1144bf56a8a758d2801200bb89c26ce8f5a086d818affb473364424f94f701cbf749 ffmpeg-2.8.2.tar.bz2 d9bb652093b1c2d03cead78bcafd59fc8305f36fe5359ac5d7caf038889f1239829e288c07e77a11bbef89de5fe54a5eae50a1c4718ec77137bb677ef9069e54 configure-dlvsym.patch -d4d369055ef9ec8742f971786b05b89a5748a32cee711f623b71e8aea54b004bebda4e618017a351162647360632b13bcc7f09059938734e692ec841fe769c46 fix-flv-extradata.patch" +d4d369055ef9ec8742f971786b05b89a5748a32cee711f623b71e8aea54b004bebda4e618017a351162647360632b13bcc7f09059938734e692ec841fe769c46 fix-flv-extradata.patch +29b669fd4069841b274392a382f07505c60f2ca37eea8b441609d48b7ea79e80f5396cbcb00763dfc076729287b4c0d4497eb6aa1c350f1d9574095ecb2351c0 fix-mpegtsenc-cbr-scaling.patch" diff --git a/main/ffmpeg/fix-mpegtsenc-cbr-scaling.patch b/main/ffmpeg/fix-mpegtsenc-cbr-scaling.patch new file mode 100644 index 0000000000..25f85cb378 --- /dev/null +++ b/main/ffmpeg/fix-mpegtsenc-cbr-scaling.patch @@ -0,0 +1,20 @@ +diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c +index 468bad4..8c0987c 100644 +--- a/libavformat/mpegtsenc.c ++++ b/libavformat/mpegtsenc.c +@@ -852,12 +852,9 @@ static int mpegts_write_header(AVFormatContext *s) + ts_st = pcr_st->priv_data; + + if (ts->mux_rate > 1) { +- service->pcr_packet_period = (ts->mux_rate * ts->pcr_period) / +- (TS_PACKET_SIZE * 8 * 1000); +- ts->sdt_packet_period = (ts->mux_rate * SDT_RETRANS_TIME) / +- (TS_PACKET_SIZE * 8 * 1000); +- ts->pat_packet_period = (ts->mux_rate * PAT_RETRANS_TIME) / +- (TS_PACKET_SIZE * 8 * 1000); ++ service->pcr_packet_period = av_rescale(ts->pcr_period, ts->mux_rate, TS_PACKET_SIZE * 8 * 1000); ++ ts->sdt_packet_period = av_rescale(SDT_RETRANS_TIME, ts->mux_rate, TS_PACKET_SIZE * 8 * 1000); ++ ts->pat_packet_period = av_rescale(PAT_RETRANS_TIME, ts->mux_rate, TS_PACKET_SIZE * 8 * 1000); + + if (ts->copyts < 1) + ts->first_pcr = av_rescale(s->max_delay, PCR_TIME_BASE, AV_TIME_BASE); |