Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-12-07 Thread Gyan Doshi
On 08-12-2020 12:19 pm, Vignesh Ravichandran wrote: Friendly ping to check if the patch has been pushed. No. You can check its status at https://patchwork.ffmpeg.org/project/ffmpeg/patch/20201201101040.28338-1-vignesh.ravichandra...@gmail.com/ State will be 'Accepted' when pushed.

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-12-07 Thread Vignesh Ravichandran
Friendly ping to check if the patch has been pushed. Thanks, Vignesh On Fri, Dec 4, 2020 at 8:04 AM Steven Liu wrote: > > > > 2020年12月1日 下午6:10,Vignesh Ravichandran > 写道: > > > > Bug ID: 8989 > > > > This is is due to the following behavior in the current code: > > 1. The

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-12-03 Thread Steven Liu
> 2020年12月1日 下午6:10,Vignesh Ravichandran 写道: > > Bug ID: 8989 > > This is is due to the following behavior in the current code: > 1. The initial_prog_date_time gets set to the current local time > 2. The existing playlist (.m3u8) file gets parsed and the segments present > are added to the

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist Bug ID: 8989

2020-12-01 Thread Vignesh Ravichandran
Ping Steven, Andreas, Andriy and others, I have pushed a patch with the sscanf check ( http://ffmpeg.org/pipermail/ffmpeg-devel/2020-December/273185.html) and also verified that the build passes (

[FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-12-01 Thread Vignesh Ravichandran
Bug ID: 8989 This is is due to the following behavior in the current code: 1. The initial_prog_date_time gets set to the current local time 2. The existing playlist (.m3u8) file gets parsed and the segments present are added to the variant stream 3. The new segment is created and added 4. The

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist Bug ID: 8989

2020-11-26 Thread Andriy Gelman
On Thu, 26. Nov 19:51, Vignesh Ravichandran wrote: > This is is due to the following behavior in the current code: > 1. The initial_prog_date_time gets set to the current local time > 2. The existing playlist (.m3u8) file gets parsed and the segments present > are added to the variant stream > 3.

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist Bug ID: 8989

2020-11-26 Thread Steven Liu
> 2020年11月27日 下午2:36,Vignesh Ravichandran 写道: > > av_isdigit seems to only check if the integer is from 0 to 9. So values > above 9 would fail the check, for example: 2020 would fail the check. Also, > we will not be able to use av_isdigit for checking the double value. > > On Fri, Nov 27,

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist Bug ID: 8989

2020-11-26 Thread Vignesh Ravichandran
av_isdigit seems to only check if the integer is from 0 to 9. So values above 9 would fail the check, for example: 2020 would fail the check. Also, we will not be able to use av_isdigit for checking the double value. On Fri, Nov 27, 2020 at 7:41 AM Steven Liu wrote: > > > > 2020年11月26日

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist Bug ID: 8989

2020-11-26 Thread Steven Liu
> 2020年11月26日 下午10:21,Vignesh Ravichandran > 写道: > > This is is due to the following behavior in the current code: > 1. The initial_prog_date_time gets set to the current local time > 2. The existing playlist (.m3u8) file gets parsed and the segments present > are added to the variant stream

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-11-26 Thread Vignesh Ravichandran
Sounds good :D I have incorporated the changes and resubmitted the patch - http://ffmpeg.org/pipermail/ffmpeg-devel/2020-November/272964.html Please review. Thanks, Vignesh On Thu, Nov 26, 2020 at 12:37 PM Steven Liu wrote: > > > > 2020年11月26日 下午12:43,Vignesh Ravichandran < >

[FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist Bug ID: 8989

2020-11-26 Thread Vignesh Ravichandran
This is is due to the following behavior in the current code: 1. The initial_prog_date_time gets set to the current local time 2. The existing playlist (.m3u8) file gets parsed and the segments present are added to the variant stream 3. The new segment is created and added 4. The existing

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-11-25 Thread Steven Liu
> 2020年11月26日 下午12:43,Vignesh Ravichandran > 写道: > > This check may not be enough. The below values would pass the check which > should not be the case: > 20-11-26T08:34:00.000 > 2020-11-26T8:34:00.000 > 2020-11-26T08:60:00.000 > 2020-11-26T08:60:0.000 > 2020-13-26T08:34:00.000 > > The

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-11-25 Thread Vignesh Ravichandran
This check may not be enough. The below values would pass the check which should not be the case: 20-11-26T08:34:00.000 2020-11-26T8:34:00.000 2020-11-26T08:60:00.000 2020-11-26T08:60:0.000 2020-13-26T08:34:00.000 The regex check approach mentioned earlier checks: 1. The value is in

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-11-25 Thread Steven Liu
> 2020年11月25日 下午9:57,Vignesh Ravichandran 写道: > > Sure, how about the snippet below: > > regex_t regex; > regcomp(, > "([12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][1-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]).([0-9]{3}))", > REG_EXTENDED); > if (regexec(, ptr, 0, NULL, 0) ==

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-11-25 Thread Vignesh Ravichandran
Sure, how about the snippet below: regex_t regex; regcomp(, "([12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][1-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]).([0-9]{3}))", REG_EXTENDED); if (regexec(, ptr, 0, NULL, 0) == REG_NOMATCH) { ret = AVERROR_INVALIDDATA; goto fail; } On Wed, Nov

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-11-25 Thread Steven Liu
> 2020年11月25日 下午7:49,Vignesh Ravichandran 写道: > > We could add a simple check like below to prevent it: > > if (sscanf(ptr, "%d-%d-%dT%d:%d:%d.%lf", , , , , , , ) != 7) > { > ret = AVERROR_INVALIDDATA; > goto fail; > } > > Please let me know. Not sure this is better way, what about

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-11-25 Thread Vignesh Ravichandran
We could add a simple check like below to prevent it: if (sscanf(ptr, "%d-%d-%dT%d:%d:%d.%lf", , , , , , , ) != 7) { ret = AVERROR_INVALIDDATA; goto fail; } Please let me know. Thanks, Vignesh On Wed, Nov 25, 2020 at 11:29 AM Steven Liu wrote: > > > > 2020年11月25日 下午1:16,Vignesh

Re: [FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-11-24 Thread Steven Liu
> 2020年11月25日 下午1:16,Vignesh Ravichandran 写道: > > Bug ID: 8989 > > This is is due to the following behavior in the current code: > 1. The initial_prog_date_time gets set to the current local time > 2. The existing playlist (.m3u8) file gets parsed and the segments present > are added to the

[FFmpeg-devel] [PATCH] avformat/hls: Fixes overwriting existing #EXT-X-PROGRAM-DATE-TIME value in HLS playlist

2020-11-24 Thread Vignesh Ravichandran
Bug ID: 8989 This is is due to the following behavior in the current code: 1. The initial_prog_date_time gets set to the current local time 2. The existing playlist (.m3u8) file gets parsed and the segments present are added to the variant stream 3. The new segment is created and added 4. The