Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] lavf/whip: improve RTP muxer error message
@ 2026-01-20 11:45 Devraj Ajmera via ffmpeg-devel
  2026-01-22  0:50 ` [FFmpeg-devel] " Jack Lau via ffmpeg-devel
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Devraj Ajmera via ffmpeg-devel @ 2026-01-20 11:45 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Devraj Ajmera

[-- Attachment #1: Type: text/plain, Size: 176 bytes --]

Hello,

This patch improves the error message shown when the RTP muxer
cannot be guessed in the WHIP muxer, making the failure reason
clearer to users.

Regards,
Devraj Ajmera

[-- Attachment #2: 0001-lavf-whip-improve-RTP-muxer-error-message.patch --]
[-- Type: application/octet-stream, Size: 861 bytes --]

[-- Attachment #3: Type: text/plain, Size: 163 bytes --]

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] Re: [PATCH] lavf/whip: improve RTP muxer error message
  2026-01-20 11:45 [FFmpeg-devel] [PATCH] lavf/whip: improve RTP muxer error message Devraj Ajmera via ffmpeg-devel
@ 2026-01-22  0:50 ` Jack Lau via ffmpeg-devel
  2026-01-22  2:12 ` Timo Rothenpieler via ffmpeg-devel
  2026-01-23  6:12 ` Devraj Ajmera via ffmpeg-devel
  2 siblings, 0 replies; 12+ messages in thread
From: Jack Lau via ffmpeg-devel @ 2026-01-22  0:50 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Jack Lau

Hi

> On Jan 20, 2026, at 19:45, Devraj Ajmera via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote:
> 
> Hello,
> 
> This patch improves the error message shown when the RTP muxer
> cannot be guessed in the WHIP muxer, making the failure reason
> clearer to users.
> 
> Regards,
> Devraj Ajmera
> From 854c0b01a67da3549acbac1200f00b2b0f680907 Mon Sep 17 00:00:00 2001
> From: devraj ajmera <devrajajmera077@gmail.com>
> Date: Tue, 20 Jan 2026 17:02:23 +0530
> Subject: [PATCH] lavf/whip: improve RTP muxer error message
> 
> ---
>  libavformat/whip.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/whip.c b/libavformat/whip.c
> index 6a9b208f69..875cb43a04 100644
> --- a/libavformat/whip.c
> +++ b/libavformat/whip.c
> @@ -1550,7 +1550,7 @@ static int create_rtp_muxer(AVFormatContext *s)
>       const AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);
>      if (!rtp_format) {
> -        av_log(whip, AV_LOG_ERROR, "Failed to guess rtp muxer\n");
> +        av_log(whip, AV_LOG_ERROR,"WHIP: failed to guess RTP muxer, ensure RTP is enabled in build\n”);
There’s no need prefix “WHIP:” since this av_log already has `avcl`

And you might be prefer submit patch to https://code.ffmpeg.org/FFmpeg/FFmpeg
>          ret = AVERROR(ENOSYS);
>          goto end;
>      }
> -- 
> 2.52.0.windows.1___________________________________________
> ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
> To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
Thanks,
Jack
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] Re: [PATCH] lavf/whip: improve RTP muxer error message
  2026-01-20 11:45 [FFmpeg-devel] [PATCH] lavf/whip: improve RTP muxer error message Devraj Ajmera via ffmpeg-devel
  2026-01-22  0:50 ` [FFmpeg-devel] " Jack Lau via ffmpeg-devel
@ 2026-01-22  2:12 ` Timo Rothenpieler via ffmpeg-devel
  2026-01-23  6:12 ` Devraj Ajmera via ffmpeg-devel
  2 siblings, 0 replies; 12+ messages in thread
From: Timo Rothenpieler via ffmpeg-devel @ 2026-01-22  2:12 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Timo Rothenpieler


[-- Attachment #1.1.1.1: Type: text/plain, Size: 422 bytes --]

On 20.01.2026 12:45, Devraj Ajmera via ffmpeg-devel wrote:
> Hello,
> 
> This patch improves the error message shown when the RTP muxer
> cannot be guessed in the WHIP muxer, making the failure reason
> clearer to users.

Shouldn't this whole condition be returning AVERROR_BUG instead, and 
configure have proper dependencies set, so that the whip muxer can't be 
enabled without rtp, if it hard-depends on it?

[-- Attachment #1.1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3203 bytes --]

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

[-- Attachment #2: Type: text/plain, Size: 163 bytes --]

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] Re: [PATCH] lavf/whip: improve RTP muxer error message
  2026-01-20 11:45 [FFmpeg-devel] [PATCH] lavf/whip: improve RTP muxer error message Devraj Ajmera via ffmpeg-devel
  2026-01-22  0:50 ` [FFmpeg-devel] " Jack Lau via ffmpeg-devel
  2026-01-22  2:12 ` Timo Rothenpieler via ffmpeg-devel
@ 2026-01-23  6:12 ` Devraj Ajmera via ffmpeg-devel
  2026-01-23  6:31   ` Devraj Ajmera via ffmpeg-devel
  2 siblings, 1 reply; 12+ messages in thread
From: Devraj Ajmera via ffmpeg-devel @ 2026-01-23  6:12 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Devraj Ajmera

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

Hi Jack,

Thanks for the review.

You are right, the "WHIP:" prefix is unnecessary since av_log already has
context.
I have updated the patch accordingly and sent a revised version.

Regards,
Devraj Ajmera

On Tue, Jan 20, 2026 at 5:15 PM Devraj Ajmera <devrajajmera077@gmail.com>
wrote:

> Hello,
>
> This patch improves the error message shown when the RTP muxer
> cannot be guessed in the WHIP muxer, making the failure reason
> clearer to users.
>
> Regards,
> Devraj Ajmera
>

[-- Attachment #2: 0001-lavf-whip-improve-RTP-muxer-error-message.patch --]
[-- Type: application/octet-stream, Size: 949 bytes --]

[-- Attachment #3: Type: text/plain, Size: 163 bytes --]

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] Re: [PATCH] lavf/whip: improve RTP muxer error message
  2026-01-23  6:12 ` Devraj Ajmera via ffmpeg-devel
@ 2026-01-23  6:31   ` Devraj Ajmera via ffmpeg-devel
  2026-01-23  7:27     ` Jack Lau via ffmpeg-devel
  2026-01-24 15:34     ` Devraj Ajmera via ffmpeg-devel
  0 siblings, 2 replies; 12+ messages in thread
From: Devraj Ajmera via ffmpeg-devel @ 2026-01-23  6:31 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Devraj Ajmera

Hi Timo,

Thanks for the insightful comment.

You are right that if WHIP hard-depends on RTP, this might be better
handled at configure time rather than at runtime. The intent of this
patch was limited to improving the clarity of the existing error path,
without changing behavior.

I agree this deserves a closer look. Would you prefer addressing this
by tightening the configure dependencies for the WHIP muxer, or by
adjusting the error handling (e.g. AVERROR_BUG) in this code path?

Thanks,
Devraj

On Fri, Jan 23, 2026 at 11:42 AM Devraj Ajmera <devrajajmera077@gmail.com>
wrote:

> Hi Jack,
>
> Thanks for the review.
>
> You are right, the "WHIP:" prefix is unnecessary since av_log already has
> context.
> I have updated the patch accordingly and sent a revised version.
>
> Regards,
> Devraj Ajmera
>
> On Tue, Jan 20, 2026 at 5:15 PM Devraj Ajmera <devrajajmera077@gmail.com>
> wrote:
>
>> Hello,
>>
>> This patch improves the error message shown when the RTP muxer
>> cannot be guessed in the WHIP muxer, making the failure reason
>> clearer to users.
>>
>> Regards,
>> Devraj Ajmera
>>
>
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] Re: [PATCH] lavf/whip: improve RTP muxer error message
  2026-01-23  6:31   ` Devraj Ajmera via ffmpeg-devel
@ 2026-01-23  7:27     ` Jack Lau via ffmpeg-devel
  2026-01-24 15:34     ` Devraj Ajmera via ffmpeg-devel
  1 sibling, 0 replies; 12+ messages in thread
From: Jack Lau via ffmpeg-devel @ 2026-01-23  7:27 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Jack Lau


Hi,
> On Jan 23, 2026, at 14:31, Devraj Ajmera via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote:
> 
> Hi Timo,
> 
> Thanks for the insightful comment.
> 
> You are right that if WHIP hard-depends on RTP, this might be better
> handled at configure time rather than at runtime. The intent of this
> patch was limited to improving the clarity of the existing error path,
> without changing behavior.

configure already deps the rtp_muxer via whip_muxer_select, so it should never hit this error.

So maybe use av_unreachable() to replace current error handling?
> 
> I agree this deserves a closer look. Would you prefer addressing this
> by tightening the configure dependencies for the WHIP muxer, or by
> adjusting the error handling (e.g. AVERROR_BUG) in this code path?
> 
> Thanks,
> Devraj
> 
> On Fri, Jan 23, 2026 at 11:42 AM Devraj Ajmera <devrajajmera077@gmail.com>
> wrote:
> 
>> Hi Jack,
>> 
>> Thanks for the review.
>> 
>> You are right, the "WHIP:" prefix is unnecessary since av_log already has
>> context.
>> I have updated the patch accordingly and sent a revised version.
>> 
>> Regards,
>> Devraj Ajmera
>> 
>> On Tue, Jan 20, 2026 at 5:15 PM Devraj Ajmera <devrajajmera077@gmail.com>
>> wrote:
>> 
>>> Hello,
>>> 
>>> This patch improves the error message shown when the RTP muxer
>>> cannot be guessed in the WHIP muxer, making the failure reason
>>> clearer to users.
>>> 
>>> Regards,
>>> Devraj Ajmera
>>> 
>> 
> _______________________________________________
> ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
> To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

BTW, top-posting isn’t acceptable in this mail list.

Best,
Jack

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] Re: [PATCH] lavf/whip: improve RTP muxer error message
  2026-01-23  6:31   ` Devraj Ajmera via ffmpeg-devel
  2026-01-23  7:27     ` Jack Lau via ffmpeg-devel
@ 2026-01-24 15:34     ` Devraj Ajmera via ffmpeg-devel
  2026-01-30  5:32       ` Devraj Ajmera via ffmpeg-devel
  1 sibling, 1 reply; 12+ messages in thread
From: Devraj Ajmera via ffmpeg-devel @ 2026-01-24 15:34 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Devraj Ajmera

Hi Jack,

> configure already deps the rtp_muxer via whip_muxer_select, so it should
never hit this error.
> So maybe use av_unreachable() to replace current error handling?

That makes sense. If configure already enforces the RTP dependency via
whip_muxer_select, then this code path should indeed be unreachable.

Using av_unreachable() here sounds reasonable. I will prepare an updated
patch replacing the current error handling accordingly.

Noted.

Regards,
Devraj

On Fri, Jan 23, 2026 at 12:01 PM Devraj Ajmera <devrajajmera077@gmail.com>
wrote:

> Hi Timo,
>
> Thanks for the insightful comment.
>
> You are right that if WHIP hard-depends on RTP, this might be better
> handled at configure time rather than at runtime. The intent of this
> patch was limited to improving the clarity of the existing error path,
> without changing behavior.
>
> I agree this deserves a closer look. Would you prefer addressing this
> by tightening the configure dependencies for the WHIP muxer, or by
> adjusting the error handling (e.g. AVERROR_BUG) in this code path?
>
> Thanks,
> Devraj
>
> On Fri, Jan 23, 2026 at 11:42 AM Devraj Ajmera <devrajajmera077@gmail.com>
> wrote:
>
>> Hi Jack,
>>
>> Thanks for the review.
>>
>> You are right, the "WHIP:" prefix is unnecessary since av_log already has
>> context.
>> I have updated the patch accordingly and sent a revised version.
>>
>> Regards,
>> Devraj Ajmera
>>
>> On Tue, Jan 20, 2026 at 5:15 PM Devraj Ajmera <devrajajmera077@gmail.com>
>> wrote:
>>
>>> Hello,
>>>
>>> This patch improves the error message shown when the RTP muxer
>>> cannot be guessed in the WHIP muxer, making the failure reason
>>> clearer to users.
>>>
>>> Regards,
>>> Devraj Ajmera
>>>
>>
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] Re: [PATCH] lavf/whip: improve RTP muxer error message
  2026-01-24 15:34     ` Devraj Ajmera via ffmpeg-devel
@ 2026-01-30  5:32       ` Devraj Ajmera via ffmpeg-devel
  2026-01-30  8:28         ` Jack Lau via ffmpeg-devel
  2026-01-30 12:05         ` Devraj Ajmera via ffmpeg-devel
  0 siblings, 2 replies; 12+ messages in thread
From: Devraj Ajmera via ffmpeg-devel @ 2026-01-30  5:32 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Devraj Ajmera

[-- Attachment #1: Type: text/plain, Size: 2445 bytes --]

> configure already deps the rtp_muxer via whip_muxer_select, so it should
never hit this error.

> So maybe use av_unreachable() to replace current error handling?

That makes sense. Since configure already enforces the RTP dependency via
whip_muxer_select, this code path should indeed be unreachable at runtime.

I have updated the code to replace the current error handling with
av_unreachable() accordingly, and will send an updated patch reflecting
this change.

Regards,
Devraj

On Sat, Jan 24, 2026 at 9:04 PM Devraj Ajmera <devrajajmera077@gmail.com>
wrote:

> Hi Jack,
>
> > configure already deps the rtp_muxer via whip_muxer_select, so it should
> never hit this error.
> > So maybe use av_unreachable() to replace current error handling?
>
> That makes sense. If configure already enforces the RTP dependency via
> whip_muxer_select, then this code path should indeed be unreachable.
>
> Using av_unreachable() here sounds reasonable. I will prepare an updated
> patch replacing the current error handling accordingly.
>
> Noted.
>
> Regards,
> Devraj
>
> On Fri, Jan 23, 2026 at 12:01 PM Devraj Ajmera <devrajajmera077@gmail.com>
> wrote:
>
>> Hi Timo,
>>
>> Thanks for the insightful comment.
>>
>> You are right that if WHIP hard-depends on RTP, this might be better
>> handled at configure time rather than at runtime. The intent of this
>> patch was limited to improving the clarity of the existing error path,
>> without changing behavior.
>>
>> I agree this deserves a closer look. Would you prefer addressing this
>> by tightening the configure dependencies for the WHIP muxer, or by
>> adjusting the error handling (e.g. AVERROR_BUG) in this code path?
>>
>> Thanks,
>> Devraj
>>
>> On Fri, Jan 23, 2026 at 11:42 AM Devraj Ajmera <devrajajmera077@gmail.com>
>> wrote:
>>
>>> Hi Jack,
>>>
>>> Thanks for the review.
>>>
>>> You are right, the "WHIP:" prefix is unnecessary since av_log already
>>> has context.
>>> I have updated the patch accordingly and sent a revised version.
>>>
>>> Regards,
>>> Devraj Ajmera
>>>
>>> On Tue, Jan 20, 2026 at 5:15 PM Devraj Ajmera <devrajajmera077@gmail.com>
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> This patch improves the error message shown when the RTP muxer
>>>> cannot be guessed in the WHIP muxer, making the failure reason
>>>> clearer to users.
>>>>
>>>> Regards,
>>>> Devraj Ajmera
>>>>
>>>

[-- Attachment #2: 0001-lavf-whip-mark-RTP-muxer-lookup-as-unreachable.patch --]
[-- Type: application/octet-stream, Size: 921 bytes --]

[-- Attachment #3: Type: text/plain, Size: 163 bytes --]

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] Re: [PATCH] lavf/whip: improve RTP muxer error message
  2026-01-30  5:32       ` Devraj Ajmera via ffmpeg-devel
@ 2026-01-30  8:28         ` Jack Lau via ffmpeg-devel
  2026-01-30 12:05         ` Devraj Ajmera via ffmpeg-devel
  1 sibling, 0 replies; 12+ messages in thread
From: Jack Lau via ffmpeg-devel @ 2026-01-30  8:28 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Jack Lau



> On Jan 30, 2026, at 13:32, Devraj Ajmera via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote:
> 
>> configure already deps the rtp_muxer via whip_muxer_select, so it should
> never hit this error.
> 
>> So maybe use av_unreachable() to replace current error handling?
> 
> That makes sense. Since configure already enforces the RTP dependency via
> whip_muxer_select, this code path should indeed be unreachable at runtime.
> 
> I have updated the code to replace the current error handling with
> av_unreachable() accordingly, and will send an updated patch reflecting
> this change.
> 
> Regards,
> Devraj
> 
> From 6f8fdbb6fdc448a93b7405e9e835e20c72183be0 Mon Sep 17 00:00:00 2001
> From: devraj ajmera <devrajajmera077@gmail.com>
> Date: Fri, 30 Jan 2026 10:06:27 +0530
> Subject: [PATCH] lavf/whip: mark RTP muxer lookup as unreachable
> 
> ---
>  libavformat/whip.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/libavformat/whip.c b/libavformat/whip.c
> index c3507405fa..4ff32a1a3c 100644
> --- a/libavformat/whip.c
> +++ b/libavformat/whip.c
> @@ -1550,10 +1550,8 @@ static int create_rtp_muxer(AVFormatContext *s)
>  
>      const AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);
>      if (!rtp_format) {
> -        av_log(whip, AV_LOG_ERROR,"Failed to guess RTP muxer, ensure RTP is enabled in build\n");
> -        ret = AVERROR(ENOSYS);
> -        goto end;
> -    }
> +    av_unreachable();
> +}

I think the av_unreachable() should be used with a reason

So maybe av_unreachable(“RTP muxer should be enabled”);

BTW, it seems you use wrong indent here.

>  
>      /* The UDP buffer size, may greater than MTU. */
>      buffer_size = MAX_UDP_BUFFER_SIZE;
> -- 
> 2.52.0.windows.1


_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] Re: [PATCH] lavf/whip: improve RTP muxer error message
  2026-01-30  5:32       ` Devraj Ajmera via ffmpeg-devel
  2026-01-30  8:28         ` Jack Lau via ffmpeg-devel
@ 2026-01-30 12:05         ` Devraj Ajmera via ffmpeg-devel
  2026-02-11  7:04           ` Devraj Ajmera via ffmpeg-devel
  1 sibling, 1 reply; 12+ messages in thread
From: Devraj Ajmera via ffmpeg-devel @ 2026-01-30 12:05 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Devraj Ajmera

[-- Attachment #1: Type: text/plain, Size: 3072 bytes --]

> I think the av_unreachable() should be used with a reason
>
> So maybe av_unreachable("RTP muxer should be enabled");
>
> BTW, it seems you use wrong indent here.

Thanks for the suggestion.

I have updated the code to use av_unreachable() with an explicit
reason string, and fixed the indentation to match the existing
FFmpeg style.

An updated patch reflecting these changes has been generated
and sent.

Regards,
Devraj

On Fri, Jan 30, 2026 at 11:02 AM Devraj Ajmera <devrajajmera077@gmail.com>
wrote:

> > configure already deps the rtp_muxer via whip_muxer_select, so it should
> never hit this error.
>
> > So maybe use av_unreachable() to replace current error handling?
>
> That makes sense. Since configure already enforces the RTP dependency via
> whip_muxer_select, this code path should indeed be unreachable at runtime.
>
> I have updated the code to replace the current error handling with
> av_unreachable() accordingly, and will send an updated patch reflecting
> this change.
>
> Regards,
> Devraj
>
> On Sat, Jan 24, 2026 at 9:04 PM Devraj Ajmera <devrajajmera077@gmail.com>
> wrote:
>
>> Hi Jack,
>>
>> > configure already deps the rtp_muxer via whip_muxer_select, so it
>> should never hit this error.
>> > So maybe use av_unreachable() to replace current error handling?
>>
>> That makes sense. If configure already enforces the RTP dependency via
>> whip_muxer_select, then this code path should indeed be unreachable.
>>
>> Using av_unreachable() here sounds reasonable. I will prepare an updated
>> patch replacing the current error handling accordingly.
>>
>> Noted.
>>
>> Regards,
>> Devraj
>>
>> On Fri, Jan 23, 2026 at 12:01 PM Devraj Ajmera <devrajajmera077@gmail.com>
>> wrote:
>>
>>> Hi Timo,
>>>
>>> Thanks for the insightful comment.
>>>
>>> You are right that if WHIP hard-depends on RTP, this might be better
>>> handled at configure time rather than at runtime. The intent of this
>>> patch was limited to improving the clarity of the existing error path,
>>> without changing behavior.
>>>
>>> I agree this deserves a closer look. Would you prefer addressing this
>>> by tightening the configure dependencies for the WHIP muxer, or by
>>> adjusting the error handling (e.g. AVERROR_BUG) in this code path?
>>>
>>> Thanks,
>>> Devraj
>>>
>>> On Fri, Jan 23, 2026 at 11:42 AM Devraj Ajmera <
>>> devrajajmera077@gmail.com> wrote:
>>>
>>>> Hi Jack,
>>>>
>>>> Thanks for the review.
>>>>
>>>> You are right, the "WHIP:" prefix is unnecessary since av_log already
>>>> has context.
>>>> I have updated the patch accordingly and sent a revised version.
>>>>
>>>> Regards,
>>>> Devraj Ajmera
>>>>
>>>> On Tue, Jan 20, 2026 at 5:15 PM Devraj Ajmera <
>>>> devrajajmera077@gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> This patch improves the error message shown when the RTP muxer
>>>>> cannot be guessed in the WHIP muxer, making the failure reason
>>>>> clearer to users.
>>>>>
>>>>> Regards,
>>>>> Devraj Ajmera
>>>>>
>>>>

[-- Attachment #2: 0001-lavf-whip-mark-RTP-muxer-lookup-as-unreachable.patch --]
[-- Type: application/octet-stream, Size: 1157 bytes --]

[-- Attachment #3: Type: text/plain, Size: 163 bytes --]

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] Re: [PATCH] lavf/whip: improve RTP muxer error message
  2026-01-30 12:05         ` Devraj Ajmera via ffmpeg-devel
@ 2026-02-11  7:04           ` Devraj Ajmera via ffmpeg-devel
  2026-02-11  8:29             ` Jack Lau via ffmpeg-devel
  0 siblings, 1 reply; 12+ messages in thread
From: Devraj Ajmera via ffmpeg-devel @ 2026-02-11  7:04 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Devraj Ajmera

Hi Jack,

Just a gentle ping on the updated patch that replaces the RTP muxer
error handling with av_unreachable(), incorporating your feedback
about the reason string and indentation.

Please let me know if anything else is needed.

Thanks,
Devraj


On Fri, Jan 30, 2026 at 5:35 PM Devraj Ajmera <devrajajmera077@gmail.com>
wrote:

> > I think the av_unreachable() should be used with a reason
> >
> > So maybe av_unreachable("RTP muxer should be enabled");
> >
> > BTW, it seems you use wrong indent here.
>
> Thanks for the suggestion.
>
> I have updated the code to use av_unreachable() with an explicit
> reason string, and fixed the indentation to match the existing
> FFmpeg style.
>
> An updated patch reflecting these changes has been generated
> and sent.
>
> Regards,
> Devraj
>
> On Fri, Jan 30, 2026 at 11:02 AM Devraj Ajmera <devrajajmera077@gmail.com>
> wrote:
>
>> > configure already deps the rtp_muxer via whip_muxer_select, so it
>> should never hit this error.
>>
>> > So maybe use av_unreachable() to replace current error handling?
>>
>> That makes sense. Since configure already enforces the RTP dependency via
>> whip_muxer_select, this code path should indeed be unreachable at runtime.
>>
>> I have updated the code to replace the current error handling with
>> av_unreachable() accordingly, and will send an updated patch reflecting
>> this change.
>>
>> Regards,
>> Devraj
>>
>> On Sat, Jan 24, 2026 at 9:04 PM Devraj Ajmera <devrajajmera077@gmail.com>
>> wrote:
>>
>>> Hi Jack,
>>>
>>> > configure already deps the rtp_muxer via whip_muxer_select, so it
>>> should never hit this error.
>>> > So maybe use av_unreachable() to replace current error handling?
>>>
>>> That makes sense. If configure already enforces the RTP dependency via
>>> whip_muxer_select, then this code path should indeed be unreachable.
>>>
>>> Using av_unreachable() here sounds reasonable. I will prepare an updated
>>> patch replacing the current error handling accordingly.
>>>
>>> Noted.
>>>
>>> Regards,
>>> Devraj
>>>
>>> On Fri, Jan 23, 2026 at 12:01 PM Devraj Ajmera <
>>> devrajajmera077@gmail.com> wrote:
>>>
>>>> Hi Timo,
>>>>
>>>> Thanks for the insightful comment.
>>>>
>>>> You are right that if WHIP hard-depends on RTP, this might be better
>>>> handled at configure time rather than at runtime. The intent of this
>>>> patch was limited to improving the clarity of the existing error path,
>>>> without changing behavior.
>>>>
>>>> I agree this deserves a closer look. Would you prefer addressing this
>>>> by tightening the configure dependencies for the WHIP muxer, or by
>>>> adjusting the error handling (e.g. AVERROR_BUG) in this code path?
>>>>
>>>> Thanks,
>>>> Devraj
>>>>
>>>> On Fri, Jan 23, 2026 at 11:42 AM Devraj Ajmera <
>>>> devrajajmera077@gmail.com> wrote:
>>>>
>>>>> Hi Jack,
>>>>>
>>>>> Thanks for the review.
>>>>>
>>>>> You are right, the "WHIP:" prefix is unnecessary since av_log already
>>>>> has context.
>>>>> I have updated the patch accordingly and sent a revised version.
>>>>>
>>>>> Regards,
>>>>> Devraj Ajmera
>>>>>
>>>>> On Tue, Jan 20, 2026 at 5:15 PM Devraj Ajmera <
>>>>> devrajajmera077@gmail.com> wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> This patch improves the error message shown when the RTP muxer
>>>>>> cannot be guessed in the WHIP muxer, making the failure reason
>>>>>> clearer to users.
>>>>>>
>>>>>> Regards,
>>>>>> Devraj Ajmera
>>>>>>
>>>>>
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [FFmpeg-devel] Re: [PATCH] lavf/whip: improve RTP muxer error message
  2026-02-11  7:04           ` Devraj Ajmera via ffmpeg-devel
@ 2026-02-11  8:29             ` Jack Lau via ffmpeg-devel
  0 siblings, 0 replies; 12+ messages in thread
From: Jack Lau via ffmpeg-devel @ 2026-02-11  8:29 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Jack Lau



> On Feb 11, 2026, at 15:04, Devraj Ajmera via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote:
> 
> Hi Jack,
> 
> Just a gentle ping on the updated patch that replaces the RTP muxer
> error handling with av_unreachable(), incorporating your feedback
> about the reason string and indentation.
> 
> Please let me know if anything else is needed.
> 
> Thanks,
> Devraj
> From 3e5c30b79397cade6b05693c88fd6ab4dc397f33 Mon Sep 17 00:00:00 2001
> From: devraj ajmera <devrajajmera077@gmail.com>
> Date: Fri, 30 Jan 2026 10:06:27 +0530
> Subject: [PATCH] lavf/whip: mark RTP muxer lookup as unreachable
> 
> ---
>  libavformat/whip.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/libavformat/whip.c b/libavformat/whip.c
> index c3507405fa..7f43dbf1a7 100644
> --- a/libavformat/whip.c
> +++ b/libavformat/whip.c
> @@ -1548,12 +1548,10 @@ static int create_rtp_muxer(AVFormatContext *s)
>      WHIPContext *whip = s->priv_data;
>      whip->udp->flags |= AVIO_FLAG_NONBLOCK;
>  
> -    const AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);
> -    if (!rtp_format) {
> -        av_log(whip, AV_LOG_ERROR,"Failed to guess RTP muxer, ensure RTP is enabled in build\n");
> -        ret = AVERROR(ENOSYS);
> -        goto end;
> -    }
> +   const AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);

It seems there’re still wrong indentation

And I found some muxers have same issues as whip

So I submit them to https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21731

Waiting other developers comments

> +       if (!rtp_format) {
> +           av_unreachable("RTP muxer should be enabled");
> +        }
>  
>      /* The UDP buffer size, may greater than MTU. */
>      buffer_size = MAX_UDP_BUFFER_SIZE;
> -- 
> 2.52.0.windows.1
> 


> 
> 
> On Fri, Jan 30, 2026 at 5:35 PM Devraj Ajmera <devrajajmera077@gmail.com>
> wrote:
> 
>>> I think the av_unreachable() should be used with a reason
>>> 
>>> So maybe av_unreachable("RTP muxer should be enabled");
>>> 
>>> BTW, it seems you use wrong indent here.
>> 
>> Thanks for the suggestion.
>> 
>> I have updated the code to use av_unreachable() with an explicit
>> reason string, and fixed the indentation to match the existing
>> FFmpeg style.
>> 
>> An updated patch reflecting these changes has been generated
>> and sent.
>> 
>> Regards,
>> Devraj
>> 
>> On Fri, Jan 30, 2026 at 11:02 AM Devraj Ajmera <devrajajmera077@gmail.com>
>> wrote:
>> 
>>>> configure already deps the rtp_muxer via whip_muxer_select, so it
>>> should never hit this error.
>>> 
>>>> So maybe use av_unreachable() to replace current error handling?
>>> 
>>> That makes sense. Since configure already enforces the RTP dependency via
>>> whip_muxer_select, this code path should indeed be unreachable at runtime.
>>> 
>>> I have updated the code to replace the current error handling with
>>> av_unreachable() accordingly, and will send an updated patch reflecting
>>> this change.
>>> 
>>> Regards,
>>> Devraj
>>> 
>>> On Sat, Jan 24, 2026 at 9:04 PM Devraj Ajmera <devrajajmera077@gmail.com>
>>> wrote:
>>> 
>>>> Hi Jack,
>>>> 
>>>>> configure already deps the rtp_muxer via whip_muxer_select, so it
>>>> should never hit this error.
>>>>> So maybe use av_unreachable() to replace current error handling?
>>>> 
>>>> That makes sense. If configure already enforces the RTP dependency via
>>>> whip_muxer_select, then this code path should indeed be unreachable.
>>>> 
>>>> Using av_unreachable() here sounds reasonable. I will prepare an updated
>>>> patch replacing the current error handling accordingly.
>>>> 
>>>> Noted.
>>>> 
>>>> Regards,
>>>> Devraj
>>>> 
>>>> On Fri, Jan 23, 2026 at 12:01 PM Devraj Ajmera <
>>>> devrajajmera077@gmail.com> wrote:
>>>> 
>>>>> Hi Timo,
>>>>> 
>>>>> Thanks for the insightful comment.
>>>>> 
>>>>> You are right that if WHIP hard-depends on RTP, this might be better
>>>>> handled at configure time rather than at runtime. The intent of this
>>>>> patch was limited to improving the clarity of the existing error path,
>>>>> without changing behavior.
>>>>> 
>>>>> I agree this deserves a closer look. Would you prefer addressing this
>>>>> by tightening the configure dependencies for the WHIP muxer, or by
>>>>> adjusting the error handling (e.g. AVERROR_BUG) in this code path?
>>>>> 
>>>>> Thanks,
>>>>> Devraj
>>>>> 
>>>>> On Fri, Jan 23, 2026 at 11:42 AM Devraj Ajmera <
>>>>> devrajajmera077@gmail.com> wrote:
>>>>> 
>>>>>> Hi Jack,
>>>>>> 
>>>>>> Thanks for the review.
>>>>>> 
>>>>>> You are right, the "WHIP:" prefix is unnecessary since av_log already
>>>>>> has context.
>>>>>> I have updated the patch accordingly and sent a revised version.
>>>>>> 
>>>>>> Regards,
>>>>>> Devraj Ajmera
>>>>>> 
>>>>>> On Tue, Jan 20, 2026 at 5:15 PM Devraj Ajmera <
>>>>>> devrajajmera077@gmail.com> wrote:
>>>>>> 
>>>>>>> Hello,
>>>>>>> 
>>>>>>> This patch improves the error message shown when the RTP muxer
>>>>>>> cannot be guessed in the WHIP muxer, making the failure reason
>>>>>>> clearer to users.
>>>>>>> 
>>>>>>> Regards,
>>>>>>> Devraj Ajmera
>>>>>>> 
>>>>>> 
> _______________________________________________
> ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
> To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-02-11  8:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-20 11:45 [FFmpeg-devel] [PATCH] lavf/whip: improve RTP muxer error message Devraj Ajmera via ffmpeg-devel
2026-01-22  0:50 ` [FFmpeg-devel] " Jack Lau via ffmpeg-devel
2026-01-22  2:12 ` Timo Rothenpieler via ffmpeg-devel
2026-01-23  6:12 ` Devraj Ajmera via ffmpeg-devel
2026-01-23  6:31   ` Devraj Ajmera via ffmpeg-devel
2026-01-23  7:27     ` Jack Lau via ffmpeg-devel
2026-01-24 15:34     ` Devraj Ajmera via ffmpeg-devel
2026-01-30  5:32       ` Devraj Ajmera via ffmpeg-devel
2026-01-30  8:28         ` Jack Lau via ffmpeg-devel
2026-01-30 12:05         ` Devraj Ajmera via ffmpeg-devel
2026-02-11  7:04           ` Devraj Ajmera via ffmpeg-devel
2026-02-11  8:29             ` Jack Lau via ffmpeg-devel

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