[FFmpeg-devel] [PATCH] avformat/url: Change () position in ff_make_absolute_url()

2020-12-16 Thread Michael Niedermayer
No testcase

Signed-off-by: Michael Niedermayer 
---
 libavformat/url.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/url.c b/libavformat/url.c
index 6db4b4e1ae..77d610d95f 100644
--- a/libavformat/url.c
+++ b/libavformat/url.c
@@ -211,8 +211,8 @@ int ff_make_absolute_url(char *buf, int size, const char 
*base,
 
 if (!base)
 base = "";
-if ((ret = ff_url_decompose(&ub, base, NULL) < 0) ||
-(ret = ff_url_decompose(&uc, rel,  NULL) < 0))
+if ((ret = ff_url_decompose(&ub, base, NULL)) < 0 ||
+(ret = ff_url_decompose(&uc, rel,  NULL)) < 0)
 goto error;
 
 keep = ub.url;
-- 
2.17.1

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

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

Re: [FFmpeg-devel] [PATCH] avformat/url: Change () position in ff_make_absolute_url()

2020-12-16 Thread Nicolas George
Michael Niedermayer (12020-12-16):
> No testcase
> 
> Signed-off-by: Michael Niedermayer 
> ---
>  libavformat/url.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Yes, that looks better, thanks.

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

Re: [FFmpeg-devel] [PATCH v3] avformat/framecrcenc: Make side-data checksums endian-independent

2020-12-16 Thread Nicolas George
Anton Khirnov (12020-12-13):
> IMO checksumming side data contents is a bad idea and should not be done
> at all. It's supposed to be an in-memory representation, which is
> inherently platform-dependent - besides endianness there are potential
> issues with padding or type sizes. If we want to test side data, we
> should use some other mechanism for it (e.g. ffprobe).

I agree with this take, but I think you are only grazing the tip of the
iceberg here.

I think than whenever we add a simple type (enum or structure) for use
as a side-data structure, frame property or similar, we should add a set
of function to perform the basic operations, with standardized names and
prototype: freeing, copy/cloning, printing, possibly checksumming, etc.

Do you not agree it would be a worthy discipline?

(Of course, if we agree on it, we need to revisit existing types to give
them these functions too.)

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

[FFmpeg-devel] FW: [PATCH] http: support retry on connection error

2020-12-16 Thread Eran Kornblau
Ping...

-Original Message-
From: Eran Kornblau 
Sent: Thursday, December 10, 2020 8:25 AM
To: FFmpeg development discussions and patches 
Subject: RE: [FFmpeg-devel] [PATCH] http: support retry on connection error

Resending...

-Original Message-
From: Eran Kornblau
Sent: Thursday, December 3, 2020 10:52 AM
To: FFmpeg development discussions and patches 
Subject: RE: [FFmpeg-devel] [PATCH] http: support retry on connection error

Hi Marton,

Thank you for the feedback, and sorry for my late reply :) Please see my 
responses inline, updated patch attached.

Thanks
Eran

> -Original Message-
> From: ffmpeg-devel  On Behalf Of 
> Marton Balint
> Sent: Wednesday, November 18, 2020 10:46 PM
> To: FFmpeg development discussions and patches 
> 
> Subject: Re: [FFmpeg-devel] [PATCH] http: support retry on connection 
> error
> 
> 
> > - reconnect_on_status - a list of http status codes that should be
> > retried. the list can contain explicit status codes / the strings
> > 4xx/5xx.
> 
> Maybe better name this option reconnect_on_http_error. Also this is a 
> flags-like option, so use AV_OPT_TYPE_FLAGS with 4xx and 5xx as flags.
> 
Rename - done.

Flags - the patch supports both explicit status codes (e.g. 503) and status 
groups (e.g. 4xx).
For example, it is possible to specify -reconnect_on_http_error '4xx,503'.

In my understanding, AV_OPT_TYPE_FLAGS is a simple int, so the only to support 
what I wrote above, is to assign bits to specific status codes, and I don't 
think we want to go there... (because every time someone will want to retry on 
a new status code, we will need to update the code)

> 
> > - reconnect_on_err - reconnects on arbitrary errors during connect, e.g.
> > ECONNRESET/ETIMEDOUT
> 
> Maybe reconnect_on_network_error better reflects that this reconnects 
> on underlying protocol (TCP/TLS) error.
> 
> Anyhow, the new options should be added to docs/protocols.texi.
> 
Rename & docs - done.

> > 
> > +{ "reconnect_on_err", "auto reconnect in case of tcp/tls error during 
> > connect", OFFSET(reconnect_on_err), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, D 
> > },
> > +{ "reconnect_on_status", "list of http status codes to 
> > + reconnect on. the list can include specific status codes / 4xx / 
> > + 5xx", OFFSET(reconnect_on_status), AV_OPT_TYPE_STRING, { .str = 
> > + NULL }, 0, 0, D },
> 
> AV_OPT_TYPE_FLAGS, as I explained above.
> 
Replied above

> > 
> >  location_changed = http_open_cnx_internal(h, options);
> 
> Are you sure you get AVERROR_HTTP_* here? Also if you follow the code 
> there is special handling of 401/407, that should be done first before 
> your checks, no?
> 
1. Yes, I tested the change before submitting, used some test PHP server to 
simulate errors.
This is the call stack that propagates the AVERROR_HTTP_* codes -
http_open_cnx_internal
http_connect
http_read_header
process_line
check_http_code

2. In case of 401/407, check_http_code returns 0, and therefore 
http_open_cnx_internal return 0 as well (assuming there is no other error...). 
So, it doesn't enter 'if (location_changed < 0)' and it behaves the same 
way it did before my changes.

> 
> Another comment is that if you want to reconnect based on errors 
> classified as 4xx or 5xx, then probably you should revisit 
> ff_http_averror(400, xxx) calls and check if they are indeed caused by 
> client behaviour. Because if the server is violating the protocol, 
> then they should be ff_http_averror(500, xxx) IMHO.
> 
Checked the code, I see 2 cases of ff_http_averror(400, xxx) - 1. HTTP server 
received an unexpected http method (would have been more correct to use 405, 
but don't think it matters...) 2. HTTP server received an invalid http version 
string So, I think it's fine.


> Regards,
> Marton
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fffmp
> eg.org%2Fmailman%2Flistinfo%2Fffmpeg-devel&data=04%7C01%7Ceran.kor
> nblau%40kaltura.com%7C590db1ef6c4d484bb34508d88c030453%7C0c503748de3f4
> e2597e26819d53a42b6%7C0%7C0%7C637413291875784243%7CUnknown%7CTWFpbGZsb
> 3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
> 7C1000&sdata=hemm499pmQQQEDOc4FXeq1EThvOT7FyfjWRsylFvdm0%3D&re
> served=0
> 
> To unsubscribe, visit link above, or email 
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
>


0001-http-support-retry-on-connection-error.patch
Description: 0001-http-support-retry-on-connection-error.patch
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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

Re: [FFmpeg-devel] [PATCH 0/3] add vvc raw demuxer

2020-12-16 Thread James Almer

On 12/15/2020 10:43 AM, Nuo Mi wrote:

On Tue, Dec 15, 2020 at 4:44 AM Mark Thompson  wrote:


On 14/12/2020 13:31, Nuo Mi wrote:

Hi Mark,
I have almost done the cbs for sps, pps, and slice header. I will start

to

implement the parser.


This looks fun :)


Few questions for you:
1. We need over-read some nals to detect the frame boundaries. But those
nals may switch/replace sps/pps. Do we need to use an output cbs and get
frames from the output cbs?


I'm not seeing where this can happen - if you see a new parameter set then
you must be in a new AU so you don't parse it, while a new VCL NAL as part
of a new frame with no PS before it must have a parsable header?  (Or am I
missing some problematic case?)




2. We can't handle an incompleted nal in current cbs.


https://github.com/FFmpeg/FFmpeg/blob/03c8fe49ea3f2a2444607e541dff15a1ccd7f0c2/libavcodec/h2645_parse.c#L437
,

do we have a plan to fix it? What's your suggstion for the frame split?


I'm unsure what the question is.  You will always need to keep reading
until you split a valid NAL unit which isn't in the current AU (noting that
a slice is the last slice in the current frame is never sufficient, because
suffixes might follow).

I want to feed the input buffer to cbs and get nal units from it. Seems it

does not work like this.
We still need a frame split in the parser. And feed the entire frame to
cbs.


The parser is meant to look byte by byte until it has found enough data 
to complete an entire Access Unit worth of NALUs.
See how hevc does it in 
https://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/hevc_parser.c;h=463d352055b971bdcc27a27b3fcd7aa4b609286e;hb=HEAD#l261 



Once the delimitation of an AU is found, then the resulting buffer can 
be parsed (In VVC's case, we want that to be done by CBS) and ultimately 
propagated so the generic demux code in libavformat can create complete 
packets.






3. How to well test the cbs?


Passthrough is the best initial test, by making an h266_metadata bsf (even
if it has no options).  The existing test coverage in FATE of CBS is
primarily driven by this - for H.26[45], the input streams there are a
subset of the H.26[45].1 conformance test streams chosen to cover as much
of the header space as possible.

I recommend enabling the write support ASAP (by adding the second include
of cbs_h266_syntax_template.c), because the double build can shake out
other problems too.

My original plan is cbs->parser->vvdec decoder->60% comfornace passrate ->

check in -> h266_metadata.
are you suggest we implement h266_metadata firstly?

thanks

Thanks,


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

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

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

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



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

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

Re: [FFmpeg-devel] [PATCH] avformat/url: Change () position in ff_make_absolute_url()

2020-12-16 Thread Michael Niedermayer
On Wed, Dec 16, 2020 at 07:29:08PM +0100, Nicolas George wrote:
> Michael Niedermayer (12020-12-16):
> > No testcase
> > 
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavformat/url.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Yes, that looks better, thanks.

will apply

thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The day soldiers stop bringing you their problems is the day you have stopped 
leading them. They have either lost confidence that you can help or concluded 
you do not care. Either case is a failure of leadership. - Colin Powell


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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