On Tue, 16 Dec 2014, Tristan Matthews wrote:

---
libavformat/srtpproto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/srtpproto.c b/libavformat/srtpproto.c
index f9b94d7..1f818d7 100644
--- a/libavformat/srtpproto.c
+++ b/libavformat/srtpproto.c
@@ -42,8 +42,8 @@ typedef struct SRTPProtoContext {
static const AVOption options[] = {
    { "srtp_out_suite", "", offsetof(SRTPProtoContext, out_suite), 
AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E },
    { "srtp_out_params", "", offsetof(SRTPProtoContext, out_params), 
AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E },
-    { "srtp_in_suite", "", offsetof(SRTPProtoContext, in_suite), 
AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E },
-    { "srtp_in_params", "", offsetof(SRTPProtoContext, in_params), 
AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E },
+    { "srtp_in_suite", "", offsetof(SRTPProtoContext, in_suite), 
AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D },
+    { "srtp_in_params", "", offsetof(SRTPProtoContext, in_params), 
AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D },
    { NULL }
};

--
1.9.3

Probably ok.

Keep in mind that using these is a bit more involved than you'd expect - for an input RTP stream, you probably also want to have RTCP RR, and these are also exptected to be encrypted, but not using the same key as you are using to receive. In a two-way call, you'd be sending them using the same encryption key as you use for the outgoing traffic as well, if I remember correctly.

So for an "incoming" srtp protocol instance, you'd need to set both in and out crypto parameters. IIRC these "encoding"/"decoding" flags are only used to allow avconv to find which parameters belong to which component in the chain - if you set up this protocol manually using your own code (as you probably need to do in order to use it), you set the flags directly (or in an AVDictionary) and the decoding/encoding flags aren't taken into consideration at all.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to