diff mbox series

[FFmpeg-devel,1/1] librtmp: make flashVer case consistent

Message ID 20220406051146.1701100-1-tmatth@videolan.org
State New
Headers show
Series [FFmpeg-devel,1/1] librtmp: make flashVer case consistent | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

Tristan Matthews April 6, 2022, 5:11 a.m. UTC
This is basically a cosmetic change (no functional difference).

---
 libavformat/librtmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marton Balint April 9, 2022, 6:45 p.m. UTC | #1
On Wed, 6 Apr 2022, Tristan Matthews wrote:

> This is basically a cosmetic change (no functional difference).
>
> ---
> libavformat/librtmp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c
> index 43013e46e0..b23adb9593 100644
> --- a/libavformat/librtmp.c
> +++ b/libavformat/librtmp.c
> @@ -115,7 +115,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
>     if (ctx->app)      len += strlen(ctx->app)      + sizeof(" app=");
>     if (ctx->tcurl)    len += strlen(ctx->tcurl)    + sizeof(" tcUrl=");
>     if (ctx->pageurl)  len += strlen(ctx->pageurl)  + sizeof(" pageUrl=");
> -    if (ctx->flashver) len += strlen(ctx->flashver) + sizeof(" flashver=");
> +    if (ctx->flashver) len += strlen(ctx->flashver) + sizeof(" flashVer=");

Actually this whole rtmp_open function should be reworked to use an 
AVBPrint buffer to generate the rtmp URL. The way it works now - 
calculating the length first then creating the actual sting - is 
very ugly.

Regards,
Marton
Tristan Matthews April 11, 2022, 3:48 p.m. UTC | #2
On Sat, Apr 9, 2022 at 2:45 PM Marton Balint <cus@passwd.hu> wrote:

>
>
> On Wed, 6 Apr 2022, Tristan Matthews wrote:
>
> > This is basically a cosmetic change (no functional difference).
> >
> > ---
> > libavformat/librtmp.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c
> > index 43013e46e0..b23adb9593 100644
> > --- a/libavformat/librtmp.c
> > +++ b/libavformat/librtmp.c
> > @@ -115,7 +115,7 @@ static int rtmp_open(URLContext *s, const char *uri,
> int flags)
> >     if (ctx->app)      len += strlen(ctx->app)      + sizeof(" app=");
> >     if (ctx->tcurl)    len += strlen(ctx->tcurl)    + sizeof(" tcUrl=");
> >     if (ctx->pageurl)  len += strlen(ctx->pageurl)  + sizeof("
> pageUrl=");
> > -    if (ctx->flashver) len += strlen(ctx->flashver) + sizeof("
> flashver=");
> > +    if (ctx->flashver) len += strlen(ctx->flashver) + sizeof("
> flashVer=");
>
> Actually this whole rtmp_open function should be reworked to use an
> AVBPrint buffer to generate the rtmp URL. The way it works now -
> calculating the length first then creating the actual sting - is
> very ugly.
>
>
Oh yeah good call, I will follow up with that instead.
diff mbox series

Patch

diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c
index 43013e46e0..b23adb9593 100644
--- a/libavformat/librtmp.c
+++ b/libavformat/librtmp.c
@@ -115,7 +115,7 @@  static int rtmp_open(URLContext *s, const char *uri, int flags)
     if (ctx->app)      len += strlen(ctx->app)      + sizeof(" app=");
     if (ctx->tcurl)    len += strlen(ctx->tcurl)    + sizeof(" tcUrl=");
     if (ctx->pageurl)  len += strlen(ctx->pageurl)  + sizeof(" pageUrl=");
-    if (ctx->flashver) len += strlen(ctx->flashver) + sizeof(" flashver=");
+    if (ctx->flashver) len += strlen(ctx->flashver) + sizeof(" flashVer=");
 
     if (ctx->conn) {
         char *sep, *p = ctx->conn;