Skip to content

Instantly share code, notes, and snippets.

View j0sh's full-sized avatar
🐠

Josh Allmann j0sh

🐠
View GitHub Profile
@j0sh
j0sh / gist:3138559
Created July 18, 2012 20:11
ffrtmp: Work with rtmpd.
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index b48274b..72e1dcf 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -879,17 +879,18 @@ static int rtmp_parse_result(URLContext *s, RTMPContext *rt, RTMPPacket *pkt)
if (!ff_amf_get_field_value(pkt->data + 9, data_end,
"description", tmpstr, sizeof(tmpstr)))
av_log(s, AV_LOG_ERROR, "Server error: %s\n",tmpstr);
- return -1;
+ return 1;
@j0sh
j0sh / .patch
Created May 10, 2012 23:49
Don't double-enqueue packets for delete.
commit 0d6fe2f32bcece6ecacfabfc894846a9a3d2f262
Author: Josh Allmann <joshua.allmann@gmail.com>
Date: Thu May 10 16:40:03 2012 -0700
-- Don't double-enqueue packets for delete.
This may lead to an infinite loop in some cases,
especially with dependent protocols that are not chained.
diff --git a/sources/thelib/src/protocols/baseprotocol.cpp b/sources/thelib/src/protocols/baseprotocol.cpp
@j0sh
j0sh / 0001-Add-Variant-constructor-for-bytearrays.patch
Created April 9, 2012 15:45
rtmpd: Add Variant constructor for bytearrays.
From ff54f597dddf014f215a0e6ed4fe54bac23b9efb Mon Sep 17 00:00:00 2001
From: Josh Allmann <joshua.allmann@gmail.com>
Date: Thu, 5 Apr 2012 13:52:37 -0700
Subject: [PATCH] -- Add Variant constructor for bytearrays.
---
sources/common/include/utils/misc/variant.h | 1 +
sources/common/src/utils/misc/variant.cpp | 8 ++++++++
2 files changed, 9 insertions(+), 0 deletions(-)
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2007 Josh Tynjala
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@j0sh
j0sh / 0001-RTMP-Enable-application-specified-clientids.patch
Created January 23, 2012 10:17
RTMP: Enable application-specified clientids.
From 9c3faeb2136528f72e496f7458b1feefbcc471ae Mon Sep 17 00:00:00 2001
From: Josh Allmann <joshua.allmann@gmail.com>
Date: Mon, 23 Jan 2012 02:14:40 -0800
Subject: [PATCH] -- RTMP: Enable application-specified clientids.
---
.../protocols/rtmp/basertmpappprotocolhandler.h | 8 ++++++++
.../rtmp/messagefactories/streammessagefactory.h | 16 ++++++++--------
.../rtmp/streaming/baseoutnetrtmpstream.h | 2 +-
.../protocols/rtmp/streaming/innetrtmpstream.h | 2 +-
@j0sh
j0sh / 0001-Allow-loading-application-less-modules.patch
Created January 23, 2012 08:16
RTMPD: Allow loading application-less modules.
From d6d62a145d125eaec2ed0e513c50be2b72341669 Mon Sep 17 00:00:00 2001
From: Josh Allmann <joshua.allmann@gmail.com>
Date: Mon, 23 Jan 2012 00:14:19 -0800
Subject: [PATCH] -- Allow loading application-less modules.
This may be useful for eg, libs that register common protocols.
---
sources/thelib/src/configuration/module.cpp | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
@j0sh
j0sh / 0001-Make-stream-creation-and-teardown-more-resilient-to-.patch
Created January 14, 2012 00:21
Make stream creation and teardown more resilient to weirdness.
From b7f142b41db08211f211b91996cd6a439cd18fb5 Mon Sep 17 00:00:00 2001
From: Josh Allmann <joshua.allmann@gmail.com>
Date: Fri, 13 Jan 2012 16:20:57 -0800
Subject: [PATCH] Make stream creation and teardown more resilient to
weirdness.
---
.../thelib/src/protocols/rtmp/basertmpprotocol.cpp | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
@j0sh
j0sh / 0001-RTMP-Allow-application-selectable-innet-streams.patch
Created January 13, 2012 21:20
RTMP: Allow application-selectable innet streams.
From 16a5d60ae90601063f251a953e307261d991310b Mon Sep 17 00:00:00 2001
From: Josh Allmann <joshua.allmann@gmail.com>
Date: Fri, 13 Jan 2012 18:25:28 -0800
Subject: [PATCH 1/3] -- RTMP: Allow application-selectable innet streams.
---
.../protocols/rtmp/basertmpappprotocolhandler.h | 11 +++++++++++
.../include/protocols/rtmp/basertmpprotocol.h | 1 +
.../protocols/rtmp/streaming/innetrtmpstream.h | 5 ++---
.../protocols/rtmp/basertmpappprotocolhandler.cpp | 8 ++++++++
From bffa7d14da4e008735a803c865568bec44c2d6af Mon Sep 17 00:00:00 2001
From: Josh Allmann <joshua.allmann@gmail.com>
Date: Thu, 12 Jan 2012 20:01:03 -0800
Subject: [PATCH] -- RTMP: Allow application-selectable outfile streams.
---
.../protocols/rtmp/basertmpappprotocolhandler.h | 12 +++++-
.../protocols/rtmp/streaming/innetrtmpstream.h | 4 +-
.../protocols/rtmp/basertmpappprotocolhandler.cpp | 43 +++++++++++++++-----
.../protocols/rtmp/streaming/innetrtmpstream.cpp | 22 +---------
diff --git a/sources/thelib/include/protocols/rtmp/basertmpappprotocolhandler.h b/sources/thelib/include/protocols/rtmp/basertmpappprotocolhandler.h
index fa730fd..3a26899 100644
--- a/sources/thelib/include/protocols/rtmp/basertmpappprotocolhandler.h
+++ b/sources/thelib/include/protocols/rtmp/basertmpappprotocolhandler.h
@@ -26,10 +26,12 @@
#include "protocols/rtmp/header.h"
#include "protocols/rtmp/rtmpprotocolserializer.h"
#include "protocols/rtmp/sharedobjects/somanager.h"
-#include "basertmpprotocol.h"
+#include "streaming/baseoutstream.h"