Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Gyan Doshi <ffmpeg@gyani.pro>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avformat/tls_schannel: forward AVIO_FLAG_NONBLOCK to tcp stream
Date: Wed, 19 Jun 2024 10:08:00 +0530
Message-ID: <c1988dbd-8636-4f26-8678-436c277488d9@gyani.pro> (raw)
In-Reply-To: <316764ab-0ccc-43ff-9998-5e1d93a8078c@rothenpieler.org>



On 2024-06-18 11:53 pm, Timo Rothenpieler wrote:
> On 18.06.2024 18:56, Gyan Doshi wrote:
>> FWIW, I had to do the same for securetransport on a project a couple 
>> of years back to get rtmps working. Worked fine, and did not get any 
>> reports of ill-effects.
>
> You mean the FFmpeg implementation of rtmps?
> Cause if so, I think that only makes use of nonblocking mode for 
> receiving, not sending.
> So it wouldn't run into this if it was wrong.

IIRC, the setup/handshake phase would never complete.

Adding this fixed it

--------
+    TLSShared *s = &c->tls_shared;
+    int set_flag_nonblock = 0;
+
+    if (h->flags & AVIO_FLAG_NONBLOCK && !(s->tcp->flags & 
AVIO_FLAG_NONBLOCK)) {
+        s->tcp->flags |= AVIO_FLAG_NONBLOCK;
+        set_flag_nonblock = 1;
+    }
+
      int read = ffurl_read(c->tls_shared.tcp, data, requested);
+
+    if (set_flag_nonblock)
+        s->tcp->flags &= ~AVIO_FLAG_NONBLOCK;
--------

Regards,
Gyan

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2024-06-19  4:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 20:28 Timo Rothenpieler
2024-06-11 13:10 ` Timo Rothenpieler
2024-06-18 16:30   ` Timo Rothenpieler
2024-06-18 16:56     ` Gyan Doshi
2024-06-18 18:23       ` Timo Rothenpieler
2024-06-19  4:38         ` Gyan Doshi [this message]
2024-06-23 22:07 ` Timo Rothenpieler
2024-06-24 13:06   ` Timo Rothenpieler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c1988dbd-8636-4f26-8678-436c277488d9@gyani.pro \
    --to=ffmpeg@gyani.pro \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git