Re: [FFmpeg-devel] [PATCH v15] avformat/dashdec: add dash demuxer base version

2017-08-30 Thread Rodger Combs
I'm not confident that we'll be able to verify the correctness of any validation code for a printf format string sufficiently. Just parse out the padding value and use "%0*"PRId64. Do not pass anything other than a string literal to printf-family functions in future versions of this patch. > On

Re: [FFmpeg-devel] [PATCH v15] avformat/dashdec: add dash demuxer base version

2017-08-30 Thread 刘歧
> 在 2017年8月30日,16:15,samsamsam 写道: > > Sorry, my fault. Such simple check proposed by me is incorrect. > It not handle basic "%05d" format. That’s no matter samsamsam, if the string is not standard as specification describe, the result maybe need give an error. So that is not a generic template

Re: [FFmpeg-devel] [PATCH v15] avformat/dashdec: add dash demuxer base version

2017-08-30 Thread 刘歧
> 在 2017年8月30日,15:52,samsamsam 写道: > > What will happen when $Number%02s%08d$ > > Exacly. Such format is not allowed by dash specification. So, such validation > is sufficient. > > Please check DASH specification format like that $Number%02s%08d$ is not > allowed. > So what for you want to

Re: [FFmpeg-devel] [PATCH v15] avformat/dashdec: add dash demuxer base version

2017-08-30 Thread 刘歧
> 在 2017年8月30日,15:32,刘歧 写道: > > >> 在 2017年8月30日,14:38,samsamsam 写道: >> >> But you do not added this: >> static int get_repl_pattern_and_format(const char *i_url, const char >> *i_marker, char **o_pattern, char **o_format) >> { >> ... >> +for(ptr=start + marker_len; ptr < (end - 1); +

Re: [FFmpeg-devel] [PATCH v15] avformat/dashdec: add dash demuxer base version

2017-08-30 Thread 刘歧
> 在 2017年8月30日,14:38,samsamsam 写道: > > But you do not added this: > static int get_repl_pattern_and_format(const char *i_url, const char > *i_marker, char **o_pattern, char **o_format) > { > ... > +for(ptr=start + marker_len; ptr < (end - 1); ++ptr) { /*there is > need to check this c

Re: [FFmpeg-devel] [PATCH v15] avformat/dashdec: add dash demuxer base version

2017-08-29 Thread Liu Steven
> 在 2017年8月30日,上午3:30,samsamsam 写道: > > and think about the safety : > %02c%lld > %s%d%d%d%d > > What? With my solution this is not problem. > Why you think %s%d%d%d%d or %02c%lld give any problem? localhost:dash StevenLiu$ ./ffmpeg -i /tmp/dash.mpd ffmpeg version N-87079-g257f0d09f7 Copyright

Re: [FFmpeg-devel] [PATCH v15] avformat/dashdec: add dash demuxer base version

2017-08-28 Thread wm4
On Sun, 27 Aug 2017 22:19:31 +0800 Steven Liu wrote: > ffmpeg need a dash demuxer for demux the dash formats base on > https://github.com/samsamsam-iptvplayer/exteplayer3/blob/master/tmp/ffmpeg/patches/3.2.2/01_add_dash_demux.patch > > TODO: > 1. support multi bitrate dash > > v2 fixed: > 1

Re: [FFmpeg-devel] [PATCH v15] avformat/dashdec: add dash demuxer base version

2017-08-28 Thread 刘歧
> 在 2017年8月28日,18:12,samsamsam 写道: > > Validation will be very simple. I am talking about something like this: > static int get_repl_pattern_and_format(const char *i_url, const char > *i_marker, char **o_pattern, char **o_format) > { > ... > +for(ptr=start + marker_len; ptr < (end - 1)

Re: [FFmpeg-devel] [PATCH v15] avformat/dashdec: add dash demuxer base version

2017-08-28 Thread Rodger Combs
I would expect parsing the number internally and using the additional arg to be simpler and easier to verify than format string validation. > On Aug 28, 2017, at 04:28, samsamsam wrote: > > OK. I will. > What about adding validation of format instead of adding "something like > `"%0*"PRId64`"?

Re: [FFmpeg-devel] [PATCH v15] avformat/dashdec: add dash demuxer base version

2017-08-27 Thread Rodger Combs
You're still calling snprintf with a string derived from the XML, which is still not safe. Rather than having a format copied from the source in get_repl_pattern_and_format, you should have a fixed value of something like `"%0*"PRId64`, and specify an additional "precision" argument you parse fr

[FFmpeg-devel] [PATCH v15] avformat/dashdec: add dash demuxer base version

2017-08-27 Thread Steven Liu
ffmpeg need a dash demuxer for demux the dash formats base on https://github.com/samsamsam-iptvplayer/exteplayer3/blob/master/tmp/ffmpeg/patches/3.2.2/01_add_dash_demux.patch TODO: 1. support multi bitrate dash v2 fixed: 1. from autodetect to disabled 2. from camelCase code style to ffmpeg co