Skip to content

Instantly share code, notes, and snippets.

Avatar

Roger Pack rdp

View GitHub Profile
View cdio.diff
diff --git a/cross_compile_ffmpeg.sh b/cross_compile_ffmpeg.sh
index 1231d6c..f59244d 100755
--- a/cross_compile_ffmpeg.sh
+++ b/cross_compile_ffmpeg.sh
@@ -805,6 +805,10 @@ build_libtiff() {
sed -i.bak 's/-ltiff.*$/-ltiff -llzma -ljpeg -lz/' $PKG_CONFIG_PATH/libtiff-4.pc # static deps
}
+build_libcdio() {
+ generic_download_and_make_and_install http://git.savannah.gnu.org/cgit/libcdio.git/snapshot/libcdio-release-2.1.0.tar.gz
View ffmpeg_vbi_cc.diff
diff --git a/configure b/configure
index 080d93a129..86bdb73dc7 100755
--- a/configure
+++ b/configure
@@ -2681,6 +2681,9 @@ bink_decoder_select="blockdsp hpeldsp"
binkaudio_dct_decoder_select="mdct rdft dct sinewin wma_freqs"
binkaudio_rdft_decoder_select="mdct rdft sinewin wma_freqs"
cavs_decoder_select="blockdsp golomb h264chroma idctdsp qpeldsp videodsp"
+ccaption_raw_608_decoder_select="ccaption_decoder"
clearvideo_decoder_select="idctdsp"
View me.diff
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index d7f5bd7..afd8cef 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -716,9 +716,9 @@ dshow_list_device_options(AVFormatContext *avctx, ICreateDevEnum *devenum,
if ((r = dshow_cycle_devices(avctx, devenum, devtype, sourcetype, &device_filter, &device_unique_name)) < 0)
return r;
ctx->device_filter[devtype] = device_filter;
+ ctx->device_unique_name[devtype] = device_unique_name;
if ((r = dshow_cycle_pins(avctx, devtype, sourcetype, device_filter, NULL)) < 0)
View ffmpeg crash
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index d7f5bd7..afd8cef 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -716,9 +716,9 @@ dshow_list_device_options(AVFormatContext *avctx, ICreateDevEnum *devenum,
if ((r = dshow_cycle_devices(avctx, devenum, devtype, sourcetype, &device_filter, &device_unique_name)) < 0)
return r;
ctx->device_filter[devtype] = device_filter;
+ ctx->device_unique_name[devtype] = device_unique_name;
if ((r = dshow_cycle_pins(avctx, devtype, sourcetype, device_filter, NULL)) < 0)
View cashes crystal play
require "openssl"
NAME = "Boy"
cipher = OpenSSL::Cipher.new("AES-256-CBC")
cipher.encrypt
key = cipher.random_key
iv = cipher.random_iv
# Username
s2 = IO::Memory.new
View 8481_2.diff
diff --git a/spec/std/openssl/ssl/socket_spec.cr b/spec/std/openssl/ssl/socket_spec.cr
index df3a34a61..b1d931c34 100644
--- a/spec/std/openssl/ssl/socket_spec.cr
+++ b/spec/std/openssl/ssl/socket_spec.cr
@@ -42,7 +42,7 @@ describe OpenSSL::SSL::Socket do
# in tls 1.3, if clients don't read anything and close the connection
# the server still try and write to it a ticket, resulting in a "pipe failure"
# this context method disables the tickets which allows the behavior:
- server_context.disable_session_resume_tickets
+ #server_context.disable_session_resume_tickets
View fix 84841.diff
iff --git a/spec/std/openssl/ssl/socket_spec.cr b/spec/std/openssl/ssl/socket_spec.cr
index 1b6675327..9ba587f1f 100644
--- a/spec/std/openssl/ssl/socket_spec.cr
+++ b/spec/std/openssl/ssl/socket_spec.cr
@@ -20,6 +20,27 @@ describe OpenSSL::SSL::Socket do
end
end
+ it "accepts clients that don't read anything and close the connection" do
+ tcp_server = TCPServer.new(0)
@rdp
rdp / server.cr
Last active Dec 4, 2019 — forked from jgaskins/server.cr
Serve a sample JSON payload in Crystal
View server.cr
require "http"
require "uuid"
require "uuid/json"
class App
include HTTP::Handler
def call(context)
Fiber.yield # Simulate getting data from the DB
response_payload.to_json context.response
View faster_http.patch
diff --git a/src/http/request.cr b/src/http/request.cr
index f942c33f3..ade289eb1 100644
--- a/src/http/request.cr
+++ b/src/http/request.cr
@@ -110,7 +110,7 @@ class HTTP::Request
request = new line.method, line.resource, headers, body, line.http_version, internal: nil
if io.responds_to?(:remote_address)
- request.remote_address = io.remote_address.try &.to_s
+ #request.remote_address = io.remote_address.try &.to_s
View use_libevent_dns.cr
require "socket" # works with 0.31.1 FWIW
struct Socket::Addrinfo
class DnsRequestCbArg
getter value : Int32 | Pointer(LibC::Addrinfo) | Nil
@fiber : Fiber
def initialize
@fiber = Fiber.current
You can’t perform that action at this time.