Skip to content

Instantly share code, notes, and snippets.

View justinruggles's full-sized avatar

Justin Ruggles justinruggles

View GitHub Profile
@justinruggles
justinruggles / gist:5626a5ee51ab118b5692
Created July 18, 2014 21:41
[PATCH] lavr: Do not change the sample format for mono audio
From bbe80480e2a83895d4ba8626cad32e0004d73f1c Mon Sep 17 00:00:00 2001
From: Justin Ruggles <[email protected]>
Date: Fri, 18 Jul 2014 17:39:01 -0400
Subject: [PATCH] lavr: Do not change the sample format for mono audio
This treats mono as planar internally within libavresample rather
than changing the sample format.
---
libavresample/audio_convert.c | 4 ++--
libavresample/audio_data.c | 12 ++++++++++--
if (avr->resample_needed) {
nb_samples = nb_samples * avr->out_sample_rate + avr->in_sample_rate / 2;
nb_samples /= avr->in_sample_rate;
}
@justinruggles
justinruggles / gist:4741614
Created February 8, 2013 20:12
lavr: fix mixing matrix reduction when normalization is disabled
From c315796cd31782b98720faff17830bc1f9b76209 Mon Sep 17 00:00:00 2001
From: Justin Ruggles <[email protected]>
Date: Sun, 27 Jan 2013 14:47:54 -0500
Subject: [PATCH] lavr: fix mixing matrix reduction when normalization is disabled
In some cases when an input contributes fully to the corresponding
output, other inputs may also contribute to the same output. This is the
case, for example, for the default 5.1 to stereo downmix matrix without
normalization.
---
From 44696102f58adf000013b48e37a738b1a1d17b79 Mon Sep 17 00:00:00 2001
From: Justin Ruggles <[email protected]>
Date: Tue, 11 Dec 2012 17:36:09 -0500
Subject: [PATCH] WIP: fix the asyncts first_pts option
---
libavfilter/af_asyncts.c | 79 +++++++++++++++++++++++++++++++++------------
1 files changed, 58 insertions(+), 21 deletions(-)
diff --git a/libavfilter/af_asyncts.c b/libavfilter/af_asyncts.c
@justinruggles
justinruggles / gist:4262989
Created December 11, 2012 22:38
asyncts first_pts
From a0bfc6fd8e28d0d378c537f38ea48bbbd5aea96a Mon Sep 17 00:00:00 2001
From: Justin Ruggles <[email protected]>
Date: Tue, 11 Dec 2012 17:36:09 -0500
Subject: [PATCH] WIP: fix the asyncts first_pts option
---
libavfilter/af_asyncts.c | 79 ++++++++++++++++++++++++++++++++++-----------
libavfilter/buffersrc.c | 7 ++++
2 files changed, 66 insertions(+), 20 deletions(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index b992923..87052af 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2483,6 +2483,23 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
count++;
}
+ /* try to open decoders for all streams if not opened already */
+ for (i = 0; i < ic->nb_streams; i++) {
diff --git a/libavformat/utils.c b/libavformat/utils.c
index b992923..30c0192 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2486,6 +2486,10 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
// close codecs which were opened in try_decode_frame()
for(i=0;i<ic->nb_streams;i++) {
st = ic->streams[i];
+ if (!has_codec_parameters(st)) {
+ av_log(ic, AV_LOG_WARNING,
====================
ALREADY IN MASTER
====================
--------------------------------------------------------------------------------
CVE-2012-2772
cb7190cd2c691fd93e4d3664f3fce6c19ee001dd
master - CommitDate: Fri Mar 23 23:11:55 2012 +0100
--------------------------------------------------------------------------------
diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c
index eb2d2f9..58b3837 100644
--- a/libavfilter/af_resample.c
+++ b/libavfilter/af_resample.c
@@ -209,7 +209,8 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
if (ret > 0) {
buf_out->audio->nb_samples = ret;
- if (buf->pts != AV_NOPTS_VALUE) {
+ if (inlink->sample_rate == outlink->sample_rate &&
aac fltp, s16 [done]
aac_latm fltp, s16 [done]
ac3 fltp, s16 [done]
adpcm_4xm s16p [done]
adpcm_adx s16p [done]
adpcm_ct s16 [existing] natively interleaved
adpcm_ea s16 [existing] natively interleaved
adpcm_ea_maxis_xa s16 [existing] natively interleaved
adpcm_ea_r1 s16p [done]
adpcm_ea_r2 s16p [done]