Re: [FFmpeg-devel] [PATCH] movenc: fix warning if CONFIG_AC3_PARSER not defined
On 03/07/2019 21:28, Michael Niedermayer wrote: On Tue, Jul 02, 2019 at 02:19:37PM +0200, Alfred E. Heggestad wrote: this patch fixes a compiler warning if CONFIG_AC3_PARSER is not defined. The label 'end' is removed and all the code use the label 'err' instead. What compiler warning (this should be in the commit message) "goto err" in the case where its not an error would require a comment hi, here is the compiler warning: CC libavformat/movenc.o libavformat/movenc.c:5536:1: warning: unused label 'end' [-Wunused-label] end: ^~~~ 1 warning generated. compiler is clang 10.0.1 on OSX 10.14 /alfred ___ 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 V2 1/2] doc/muxers: fix and update docs for HLS muxer
On 28-06-2019 08:36 PM, Jun Zhao wrote: From: Jun Zhao fix and update docs for HLS muxer Signed-off-by: Jun Zhao --- doc/muxers.texi | 24 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index dd64672..d179584 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -525,7 +525,7 @@ See also the @ref{framehash} muxer. @anchor{hls} @section hls -Apple HTTP Live Streaming muxer that segments MPEG-TS according to +Apple HTTP Live Streaming muxer that segments MPEG-TS/fragmented MP4 according to the HTTP Live Streaming (HLS) specification. It creates a playlist file, and one or more segment files. The output filename @@ -767,20 +767,20 @@ ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments \ -hls_key_info_file file.keyinfo out.m3u8 @end example -@item -hls_enc @var{enc} +@item hls_enc @var{enc} Enable (1) or disable (0) the AES128 encryption. When enabled every segment generated is encrypted and the encryption key is saved as @var{playlist name}.key. -@item -hls_enc_key @var{key} +@item hls_enc_key @var{key} Hex-coded 16byte key to encrypt the segments, by default it is randomly generated. -@item -hls_enc_key_url @var{keyurl} +@item hls_enc_key_url @var{keyurl} If set, @var{keyurl} is prepended instead of @var{baseurl} to the key filename in the playlist. -@item -hls_enc_iv @var{iv} +@item hls_enc_iv @var{iv} Hex-coded 16byte initialization vector for every segment instead of the autogenerated ones. @@ -901,14 +901,22 @@ are always written into temporary file regardles of this flag if @code{master_pl @end table -@item hls_playlist_type event +@item hls_playlist_type @var{int} +Set the HLS playlist type, Default value is 0. I would prefer if you add an entry for PLAYLIST_TYPE_NONE in the options table and document it here. Then change int to value. + +Other possible values: +@table @option + +@item event Emit @code{#EXT-X-PLAYLIST-TYPE:EVENT} in the m3u8 header. Forces @option{hls_list_size} to 0; the playlist can only be appended to. -@item hls_playlist_type vod +@item vod Emit @code{#EXT-X-PLAYLIST-TYPE:VOD} in the m3u8 header. Forces @option{hls_list_size} to 0; the playlist must not change. +@end table + @item method Use the given HTTP method to create the hls files. @example @@ -1090,7 +1098,7 @@ Use persistent HTTP connections. Applicable only for HTTP output. @item timeout Set timeout for socket I/O operations. Applicable only for HTTP output. -@item -ignore_io_errors +@item ignore_io_errors Ignore IO errors during open, write and delete. Useful for long-duration runs with network output. @item headers Gyan ___ 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 V2 2/2] doc/muxers: fix docs format for DASH muxer
On 28-06-2019 08:36 PM, Jun Zhao wrote: From: Jun Zhao fix docs format for DASH muxer Signed-off-by: Jun Zhao --- doc/muxers.texi | 62 -- 1 files changed, 32 insertions(+), 30 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index d179584..c220bd2 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -220,64 +220,64 @@ In addition to the standard identifiers, an ffmpeg-specific "$ext$" identifier i When specified ffmpeg will replace $ext$ in the file name with muxing format's extensions such as mp4, webm etc., @example -ffmpeg -re -i -map 0 -map 0 -c:a libfdk_aac -c:v libx264 --b:v:0 800k -b:v:1 300k -s:v:1 320x170 -profile:v:1 baseline --profile:v:0 main -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 --b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1 --window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" +ffmpeg -re -i -map 0 -map 0 -c:a libfdk_aac -c:v libx264 \ +-b:v:0 800k -b:v:1 300k -s:v:1 320x170 -profile:v:1 baseline \ +-profile:v:0 main -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 \ +-b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1 \ +-window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" \ -f dash /path/to/out.mpd @end example @table @option -@item -min_seg_duration @var{microseconds} +@item min_seg_duration @var{microseconds} This is a deprecated option to set the segment length in microseconds, use @var{seg_duration} instead. -@item -seg_duration @var{duration} +@item seg_duration @var{duration} Set the segment length in seconds (fractional value can be set). The value is treated as average segment duration when @var{use_template} is enabled and @var{use_timeline} is disabled and as minimum segment duration for all the other use cases. -@item -window_size @var{size} +@item window_size @var{size} Set the maximum number of segments kept in the manifest. -@item -extra_window_size @var{size} +@item extra_window_size @var{size} Set the maximum number of segments kept outside of the manifest before removing from disk. -@item -remove_at_exit @var{remove} +@item remove_at_exit @var{remove} Enable (1) or disable (0) removal of all segments when finished. -@item -use_template @var{template} +@item use_template @var{template} Enable (1) or disable (0) use of SegmentTemplate instead of SegmentList. -@item -use_timeline @var{timeline} +@item use_timeline @var{timeline} Enable (1) or disable (0) use of SegmentTimeline in SegmentTemplate. -@item -single_file @var{single_file} +@item single_file @var{single_file} Enable (1) or disable (0) storing all segments in one file, accessed using byte ranges. -@item -single_file_name @var{file_name} +@item single_file_name @var{file_name} DASH-templated name to be used for baseURL. Implies @var{single_file} set to "1". In the template, "$ext$" is replaced with the file name extension specific for the segment format. -@item -init_seg_name @var{init_name} +@item init_seg_name @var{init_name} DASH-templated name to used for the initialization segment. Default is "init-stream$RepresentationID$.$ext$". "$ext$" is replaced with the file name extension specific for the segment format. -@item -media_seg_name @var{segment_name} +@item media_seg_name @var{segment_name} DASH-templated name to used for the media segments. Default is "chunk-stream$RepresentationID$-$Number%05d$.$ext$". "$ext$" is replaced with the file name extension specific for the segment format. -@item -utc_timing_url @var{utc_url} +@item utc_timing_url @var{utc_url} URL of the page that will return the UTC timestamp in ISO format. Example: "https://time.akamai.com/?iso"; @item method @var{method} Use the given HTTP method to create output files. Generally set to PUT or POST. -@item -http_user_agent @var{user_agent} +@item http_user_agent @var{user_agent} Override User-Agent field in HTTP header. Applicable only for HTTP output. -@item -http_persistent @var{http_persistent} +@item http_persistent @var{http_persistent} Use persistent HTTP connections. Applicable only for HTTP output. -@item -hls_playlist @var{hls_playlist} +@item hls_playlist @var{hls_playlist} Generate HLS playlist files as well. The master playlist is generated with the filename master.m3u8. One media playlist file is generated for each stream with filenames media_0.m3u8, media_1.m3u8, etc. -@item -streaming @var{streaming} +@item streaming @var{streaming} Enable (1) or disable (0) chunk streaming mode of output. In chunk streaming mode, each frame will be a moof fragment which forms a chunk. -@item -adaptation_sets @var{adaptation_sets} +@item adaptation_sets @var{adaptation_sets} Assign streams to AdaptationSets. Syntax is "id=x,streams=a,b,c id=y,streams=d,e" with x and y being the IDs of the adaptation sets and a,b,c,d and e are the indices of the mapped streams. To map all video (or audio) streams to an AdaptationSet, "v" (or "a") can
Re: [FFmpeg-devel] [PATCH V2 1/2] doc/muxers: fix and update docs for HLS muxer
> 在 2019年7月4日,下午4:49,Gyan 写道: > > > > On 28-06-2019 08:36 PM, Jun Zhao wrote: >> From: Jun Zhao >> >> fix and update docs for HLS muxer >> >> Signed-off-by: Jun Zhao >> --- >> doc/muxers.texi | 24 >> 1 files changed, 16 insertions(+), 8 deletions(-) >> >> diff --git a/doc/muxers.texi b/doc/muxers.texi >> index dd64672..d179584 100644 >> --- a/doc/muxers.texi >> +++ b/doc/muxers.texi >> @@ -525,7 +525,7 @@ See also the @ref{framehash} muxer. >> @anchor{hls} >> @section hls >> -Apple HTTP Live Streaming muxer that segments MPEG-TS according to >> +Apple HTTP Live Streaming muxer that segments MPEG-TS/fragmented MP4 >> according to >> the HTTP Live Streaming (HLS) specification. >>It creates a playlist file, and one or more segment files. The output >> filename >> @@ -767,20 +767,20 @@ ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags >> delete_segments \ >>-hls_key_info_file file.keyinfo out.m3u8 >> @end example >> -@item -hls_enc @var{enc} >> +@item hls_enc @var{enc} >> Enable (1) or disable (0) the AES128 encryption. >> When enabled every segment generated is encrypted and the encryption key >> is saved as @var{playlist name}.key. >> -@item -hls_enc_key @var{key} >> +@item hls_enc_key @var{key} >> Hex-coded 16byte key to encrypt the segments, by default it >> is randomly generated. >> -@item -hls_enc_key_url @var{keyurl} >> +@item hls_enc_key_url @var{keyurl} >> If set, @var{keyurl} is prepended instead of @var{baseurl} to the key >> filename >> in the playlist. >> -@item -hls_enc_iv @var{iv} >> +@item hls_enc_iv @var{iv} >> Hex-coded 16byte initialization vector for every segment instead >> of the autogenerated ones. >> @@ -901,14 +901,22 @@ are always written into temporary file regardles of >> this flag if @code{master_pl >>@end table >> -@item hls_playlist_type event >> +@item hls_playlist_type @var{int} >> +Set the HLS playlist type, Default value is 0. > > I would prefer if you add an entry for PLAYLIST_TYPE_NONE in the options > table and document it here. There have no TYPE named NONE, it’s only EVENT and VOD now in RFC 8216, there will have no playlist type when not use hls_playlist_type. keep the current option please. Thanks Steven ___ 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 V2 1/2] doc/muxers: fix and update docs for HLS muxer
On 04-07-2019 02:37 PM, Liu Steven wrote: 在 2019年7月4日,下午4:49,Gyan 写道: On 28-06-2019 08:36 PM, Jun Zhao wrote: From: Jun Zhao fix and update docs for HLS muxer Signed-off-by: Jun Zhao --- doc/muxers.texi | 24 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index dd64672..d179584 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -525,7 +525,7 @@ See also the @ref{framehash} muxer. @anchor{hls} @section hls -Apple HTTP Live Streaming muxer that segments MPEG-TS according to +Apple HTTP Live Streaming muxer that segments MPEG-TS/fragmented MP4 according to the HTTP Live Streaming (HLS) specification. It creates a playlist file, and one or more segment files. The output filename @@ -767,20 +767,20 @@ ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments \ -hls_key_info_file file.keyinfo out.m3u8 @end example -@item -hls_enc @var{enc} +@item hls_enc @var{enc} Enable (1) or disable (0) the AES128 encryption. When enabled every segment generated is encrypted and the encryption key is saved as @var{playlist name}.key. -@item -hls_enc_key @var{key} +@item hls_enc_key @var{key} Hex-coded 16byte key to encrypt the segments, by default it is randomly generated. -@item -hls_enc_key_url @var{keyurl} +@item hls_enc_key_url @var{keyurl} If set, @var{keyurl} is prepended instead of @var{baseurl} to the key filename in the playlist. -@item -hls_enc_iv @var{iv} +@item hls_enc_iv @var{iv} Hex-coded 16byte initialization vector for every segment instead of the autogenerated ones. @@ -901,14 +901,22 @@ are always written into temporary file regardles of this flag if @code{master_pl @end table -@item hls_playlist_type event +@item hls_playlist_type @var{int} +Set the HLS playlist type, Default value is 0. I would prefer if you add an entry for PLAYLIST_TYPE_NONE in the options table and document it here. There have no TYPE named NONE, it’s only EVENT and VOD now in RFC 8216, there will have no playlist type when not use hls_playlist_type. keep the current option please. I'm not referring to the types in RFC 8216. The muxer defines a constant for when no type is set, but the user can't set that via a string, so for consistency, add a string option value. It can be called 'none' or 'unset'. Right now, it can only set using an integer 0 but the two RFC types are set using a string. Gyan ___ 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 V2 1/2] doc/muxers: fix and update docs for HLS muxer
> 在 2019年7月4日,下午6:15,Gyan 写道: > > > > On 04-07-2019 02:37 PM, Liu Steven wrote: >> >>> 在 2019年7月4日,下午4:49,Gyan 写道: >>> >>> >>> >>> On 28-06-2019 08:36 PM, Jun Zhao wrote: From: Jun Zhao fix and update docs for HLS muxer Signed-off-by: Jun Zhao --- doc/muxers.texi | 24 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index dd64672..d179584 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -525,7 +525,7 @@ See also the @ref{framehash} muxer. @anchor{hls} @section hls -Apple HTTP Live Streaming muxer that segments MPEG-TS according to +Apple HTTP Live Streaming muxer that segments MPEG-TS/fragmented MP4 according to the HTTP Live Streaming (HLS) specification. It creates a playlist file, and one or more segment files. The output filename @@ -767,20 +767,20 @@ ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments \ -hls_key_info_file file.keyinfo out.m3u8 @end example -@item -hls_enc @var{enc} +@item hls_enc @var{enc} Enable (1) or disable (0) the AES128 encryption. When enabled every segment generated is encrypted and the encryption key is saved as @var{playlist name}.key. -@item -hls_enc_key @var{key} +@item hls_enc_key @var{key} Hex-coded 16byte key to encrypt the segments, by default it is randomly generated. -@item -hls_enc_key_url @var{keyurl} +@item hls_enc_key_url @var{keyurl} If set, @var{keyurl} is prepended instead of @var{baseurl} to the key filename in the playlist. -@item -hls_enc_iv @var{iv} +@item hls_enc_iv @var{iv} Hex-coded 16byte initialization vector for every segment instead of the autogenerated ones. @@ -901,14 +901,22 @@ are always written into temporary file regardles of this flag if @code{master_pl @end table -@item hls_playlist_type event +@item hls_playlist_type @var{int} +Set the HLS playlist type, Default value is 0. >>> I would prefer if you add an entry for PLAYLIST_TYPE_NONE in the options >>> table and document it here. >> There have no TYPE named NONE, >> it’s only EVENT and VOD now in RFC 8216, there will have no playlist type >> when not use hls_playlist_type. >> keep the current option please. > > I'm not referring to the types in RFC 8216. The muxer defines a constant for > when no type is set, but the user can't set that via a string, so for > consistency, add a string option value. It can be called 'none' or 'unset'. > Right now, it can only set using an integer 0 but the two RFC types are set > using a string. If user want use none, don’t use the option is a better way, not use the option to set a value. the option is here long time, i think write the description in document is ok, keep the option current status in hlsenc please. Thanks Steven ___ 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 V2 1/2] doc/muxers: fix and update docs for HLS muxer
On 04-07-2019 03:50 PM, Liu Steven wrote: 在 2019年7月4日,下午6:15,Gyan 写道: On 04-07-2019 02:37 PM, Liu Steven wrote: 在 2019年7月4日,下午4:49,Gyan 写道: On 28-06-2019 08:36 PM, Jun Zhao wrote: From: Jun Zhao fix and update docs for HLS muxer Signed-off-by: Jun Zhao --- doc/muxers.texi | 24 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index dd64672..d179584 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -525,7 +525,7 @@ See also the @ref{framehash} muxer. @anchor{hls} @section hls -Apple HTTP Live Streaming muxer that segments MPEG-TS according to +Apple HTTP Live Streaming muxer that segments MPEG-TS/fragmented MP4 according to the HTTP Live Streaming (HLS) specification. It creates a playlist file, and one or more segment files. The output filename @@ -767,20 +767,20 @@ ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments \ -hls_key_info_file file.keyinfo out.m3u8 @end example -@item -hls_enc @var{enc} +@item hls_enc @var{enc} Enable (1) or disable (0) the AES128 encryption. When enabled every segment generated is encrypted and the encryption key is saved as @var{playlist name}.key. -@item -hls_enc_key @var{key} +@item hls_enc_key @var{key} Hex-coded 16byte key to encrypt the segments, by default it is randomly generated. -@item -hls_enc_key_url @var{keyurl} +@item hls_enc_key_url @var{keyurl} If set, @var{keyurl} is prepended instead of @var{baseurl} to the key filename in the playlist. -@item -hls_enc_iv @var{iv} +@item hls_enc_iv @var{iv} Hex-coded 16byte initialization vector for every segment instead of the autogenerated ones. @@ -901,14 +901,22 @@ are always written into temporary file regardles of this flag if @code{master_pl @end table -@item hls_playlist_type event +@item hls_playlist_type @var{int} +Set the HLS playlist type, Default value is 0. I would prefer if you add an entry for PLAYLIST_TYPE_NONE in the options table and document it here. There have no TYPE named NONE, it’s only EVENT and VOD now in RFC 8216, there will have no playlist type when not use hls_playlist_type. keep the current option please. I'm not referring to the types in RFC 8216. The muxer defines a constant for when no type is set, but the user can't set that via a string, so for consistency, add a string option value. It can be called 'none' or 'unset'. Right now, it can only set using an integer 0 but the two RFC types are set using a string. If user want use none, don’t use the option is a better way, not use the option to set a value. the option is here long time, i think write the description in document is ok, keep the option current status in hlsenc please. I think it's a good convention that if a variable can assume a value at initialization, user should be able to set it to that value. Assignment by omission shouldn't be the _only_ way. What do you think? Gyan ___ 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 V2 2/2] doc/muxers: fix docs format for DASH muxer
On Thu, Jul 4, 2019 at 4:52 PM Gyan wrote: > > > > On 28-06-2019 08:36 PM, Jun Zhao wrote: > > From: Jun Zhao > > > > fix docs format for DASH muxer > > > > Signed-off-by: Jun Zhao > > --- > > doc/muxers.texi | 62 > > -- > > 1 files changed, 32 insertions(+), 30 deletions(-) > > > > diff --git a/doc/muxers.texi b/doc/muxers.texi > > index d179584..c220bd2 100644 > > --- a/doc/muxers.texi > > +++ b/doc/muxers.texi > > @@ -220,64 +220,64 @@ In addition to the standard identifiers, an > > ffmpeg-specific "$ext$" identifier i > > When specified ffmpeg will replace $ext$ in the file name with muxing > > format's extensions such as mp4, webm etc., > > > > @example > > -ffmpeg -re -i -map 0 -map 0 -c:a libfdk_aac -c:v libx264 > > --b:v:0 800k -b:v:1 300k -s:v:1 320x170 -profile:v:1 baseline > > --profile:v:0 main -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 > > --b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1 > > --window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" > > +ffmpeg -re -i -map 0 -map 0 -c:a libfdk_aac -c:v libx264 \ > > +-b:v:0 800k -b:v:1 300k -s:v:1 320x170 -profile:v:1 baseline \ > > +-profile:v:0 main -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 \ > > +-b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1 \ > > +-window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" \ > > -f dash /path/to/out.mpd > > @end example > > > > @table @option > > -@item -min_seg_duration @var{microseconds} > > +@item min_seg_duration @var{microseconds} > > This is a deprecated option to set the segment length in microseconds, > > use @var{seg_duration} instead. > > -@item -seg_duration @var{duration} > > +@item seg_duration @var{duration} > > Set the segment length in seconds (fractional value can be set). The > > value is > > treated as average segment duration when @var{use_template} is enabled and > > @var{use_timeline} is disabled and as minimum segment duration for all > > the other > > use cases. > > -@item -window_size @var{size} > > +@item window_size @var{size} > > Set the maximum number of segments kept in the manifest. > > -@item -extra_window_size @var{size} > > +@item extra_window_size @var{size} > > Set the maximum number of segments kept outside of the manifest before > > removing from disk. > > -@item -remove_at_exit @var{remove} > > +@item remove_at_exit @var{remove} > > Enable (1) or disable (0) removal of all segments when finished. > > -@item -use_template @var{template} > > +@item use_template @var{template} > > Enable (1) or disable (0) use of SegmentTemplate instead of SegmentList. > > -@item -use_timeline @var{timeline} > > +@item use_timeline @var{timeline} > > Enable (1) or disable (0) use of SegmentTimeline in SegmentTemplate. > > -@item -single_file @var{single_file} > > +@item single_file @var{single_file} > > Enable (1) or disable (0) storing all segments in one file, accessed > > using byte ranges. > > -@item -single_file_name @var{file_name} > > +@item single_file_name @var{file_name} > > DASH-templated name to be used for baseURL. Implies @var{single_file} set > > to "1". In the template, "$ext$" is replaced with the file name extension > > specific for the segment format. > > -@item -init_seg_name @var{init_name} > > +@item init_seg_name @var{init_name} > > DASH-templated name to used for the initialization segment. Default is > > "init-stream$RepresentationID$.$ext$". "$ext$" is replaced with the file > > name extension specific for the segment format. > > -@item -media_seg_name @var{segment_name} > > +@item media_seg_name @var{segment_name} > > DASH-templated name to used for the media segments. Default is > > "chunk-stream$RepresentationID$-$Number%05d$.$ext$". "$ext$" is replaced > > with the file name extension specific for the segment format. > > -@item -utc_timing_url @var{utc_url} > > +@item utc_timing_url @var{utc_url} > > URL of the page that will return the UTC timestamp in ISO format. > > Example: "https://time.akamai.com/?iso"; > > @item method @var{method} > > Use the given HTTP method to create output files. Generally set to PUT or > > POST. > > -@item -http_user_agent @var{user_agent} > > +@item http_user_agent @var{user_agent} > > Override User-Agent field in HTTP header. Applicable only for HTTP output. > > -@item -http_persistent @var{http_persistent} > > +@item http_persistent @var{http_persistent} > > Use persistent HTTP connections. Applicable only for HTTP output. > > -@item -hls_playlist @var{hls_playlist} > > +@item hls_playlist @var{hls_playlist} > > Generate HLS playlist files as well. The master playlist is generated > > with the filename master.m3u8. > > One media playlist file is generated for each stream with filenames > > media_0.m3u8, media_1.m3u8, etc. > > -@item -streaming @var{streaming} > > +@item streaming @var{streaming} > > Enable (1) or disable (0) chunk streaming mode of outp
Re: [FFmpeg-devel] [PATCH V2 1/2] doc/muxers: fix and update docs for HLS muxer
> 在 2019年7月4日,下午7:35,Gyan 写道: > > > >> On 04-07-2019 03:50 PM, Liu Steven wrote: >> >>> 在 2019年7月4日,下午6:15,Gyan 写道: >>> >>> >>> >>> On 04-07-2019 02:37 PM, Liu Steven wrote: > 在 2019年7月4日,下午4:49,Gyan 写道: > > > >> On 28-06-2019 08:36 PM, Jun Zhao wrote: >> From: Jun Zhao >> >> fix and update docs for HLS muxer >> >> Signed-off-by: Jun Zhao >> --- >> doc/muxers.texi | 24 >> 1 files changed, 16 insertions(+), 8 deletions(-) >> >> diff --git a/doc/muxers.texi b/doc/muxers.texi >> index dd64672..d179584 100644 >> --- a/doc/muxers.texi >> +++ b/doc/muxers.texi >> @@ -525,7 +525,7 @@ See also the @ref{framehash} muxer. >> @anchor{hls} >> @section hls >> -Apple HTTP Live Streaming muxer that segments MPEG-TS according to >> +Apple HTTP Live Streaming muxer that segments MPEG-TS/fragmented MP4 >> according to >> the HTTP Live Streaming (HLS) specification. >>It creates a playlist file, and one or more segment files. The output >> filename >> @@ -767,20 +767,20 @@ ffmpeg -f lavfi -re -i testsrc -c:v h264 >> -hls_flags delete_segments \ >>-hls_key_info_file file.keyinfo out.m3u8 >> @end example >> -@item -hls_enc @var{enc} >> +@item hls_enc @var{enc} >> Enable (1) or disable (0) the AES128 encryption. >> When enabled every segment generated is encrypted and the encryption key >> is saved as @var{playlist name}.key. >> -@item -hls_enc_key @var{key} >> +@item hls_enc_key @var{key} >> Hex-coded 16byte key to encrypt the segments, by default it >> is randomly generated. >> -@item -hls_enc_key_url @var{keyurl} >> +@item hls_enc_key_url @var{keyurl} >> If set, @var{keyurl} is prepended instead of @var{baseurl} to the key >> filename >> in the playlist. >> -@item -hls_enc_iv @var{iv} >> +@item hls_enc_iv @var{iv} >> Hex-coded 16byte initialization vector for every segment instead >> of the autogenerated ones. >> @@ -901,14 +901,22 @@ are always written into temporary file regardles >> of this flag if @code{master_pl >>@end table >> -@item hls_playlist_type event >> +@item hls_playlist_type @var{int} >> +Set the HLS playlist type, Default value is 0. > I would prefer if you add an entry for PLAYLIST_TYPE_NONE in the options > table and document it here. There have no TYPE named NONE, it’s only EVENT and VOD now in RFC 8216, there will have no playlist type when not use hls_playlist_type. keep the current option please. >>> I'm not referring to the types in RFC 8216. The muxer defines a constant >>> for when no type is set, but the user can't set that via a string, so for >>> consistency, add a string option value. It can be called 'none' or 'unset'. >>> Right now, it can only set using an integer 0 but the two RFC types are set >>> using a string. >> If user want use none, don’t use the option is a better way, not use the >> option to set a value. >> the option is here long time, i think write the description in document is >> ok, keep the option current status in hlsenc please. > I think it's a good convention that if a variable can assume a value at > initialization, user should be able to set it to that value. Assignment by > omission shouldn't be the _only_ way. What do you think? i think user dose not need the type option if they don’t want the type in the m3u8 list > > Gyan > ___ > 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] [PATCH 3/4] avcodec/mediacodec_wrapper: fix a potential local reference leak in ff_AMediaCodec_getCodecNameByType()
--- libavcodec/mediacodec_wrapper.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index e2df07cb41..70e1e7cae1 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@ -469,6 +469,11 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e goto done; } +if (codec_name) { +(*env)->DeleteLocalRef(env, codec_name); +codec_name = NULL; +} + /* Skip software decoders */ if ( strstr(name, "OMX.google") || -- 2.22.0 ___ 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] [PATCH 1/4] avcodec/mediacodec_wrapper: add missing include
--- libavcodec/mediacodec_wrapper.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mediacodec_wrapper.h b/libavcodec/mediacodec_wrapper.h index f0de16d669..58e5dc7d39 100644 --- a/libavcodec/mediacodec_wrapper.h +++ b/libavcodec/mediacodec_wrapper.h @@ -26,6 +26,8 @@ #include #include +#include + /** * The following API around MediaCodec and MediaFormat is based on the * NDK one provided by Google since Android 5.0. -- 2.22.0 ___ 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] [PATCH 2/4] avcodec/mediacodec_wrapper: fix a local reference leak in ff_AMediaCodec_getName()
--- libavcodec/mediacodec_wrapper.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index a024e3bdb1..e2df07cb41 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@ -1337,6 +1337,10 @@ char *ff_AMediaCodec_getName(FFAMediaCodec *codec) ret = ff_jni_jstring_to_utf_chars(env, name, codec); fail: +if (name) { +(*env)->DeleteLocalRef(env, name); +} + return ret; } -- 2.22.0 ___ 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] [PATCH 4/4] avcodec/mediacodec_wrapper: remove unused local variables in ff_AMediaCodec_getCodecNameByType()
--- libavcodec/mediacodec_wrapper.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 70e1e7cae1..5213cf640a 100644 --- a/libavcodec/mediacodec_wrapper.c +++ b/libavcodec/mediacodec_wrapper.c @@ -392,8 +392,6 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e struct JNIAMediaCodecListFields jfields = { 0 }; struct JNIAMediaFormatFields mediaformat_jfields = { 0 }; -jobject format = NULL; -jobject codec = NULL; jobject codec_name = NULL; jobject info = NULL; @@ -571,14 +569,6 @@ done_with_info: } done: -if (format) { -(*env)->DeleteLocalRef(env, format); -} - -if (codec) { -(*env)->DeleteLocalRef(env, codec); -} - if (codec_name) { (*env)->DeleteLocalRef(env, codec_name); } -- 2.22.0 ___ 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 1/4] avcodec/mediacodec_wrapper: add missing include
Matthieu Bouron (12019-07-04): > --- > libavcodec/mediacodec_wrapper.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavcodec/mediacodec_wrapper.h b/libavcodec/mediacodec_wrapper.h > index f0de16d669..58e5dc7d39 100644 > --- a/libavcodec/mediacodec_wrapper.h > +++ b/libavcodec/mediacodec_wrapper.h > @@ -26,6 +26,8 @@ > #include > #include > > +#include AFAIK, this is not the correct way of including one of our own headers, especially from the same sub-library. Just "avcodec.h". > + > /** > * The following API around MediaCodec and MediaFormat is based on the > * NDK one provided by Google since Android 5.0. 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 1/4] avcodec/mediacodec_wrapper: add missing include
On 7/4/2019 10:43 AM, Matthieu Bouron wrote: > --- > libavcodec/mediacodec_wrapper.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavcodec/mediacodec_wrapper.h b/libavcodec/mediacodec_wrapper.h > index f0de16d669..58e5dc7d39 100644 > --- a/libavcodec/mediacodec_wrapper.h > +++ b/libavcodec/mediacodec_wrapper.h > @@ -26,6 +26,8 @@ > #include > #include > > +#include "avcodec.h" is enough. This is an internal header. > + > /** > * The following API around MediaCodec and MediaFormat is based on the > * NDK one provided by Google since Android 5.0. > ___ 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 1/4] avcodec/mediacodec_wrapper: add missing include
On Thu, Jul 04, 2019 at 04:03:42PM +0200, Nicolas George wrote: > Matthieu Bouron (12019-07-04): > > --- > > libavcodec/mediacodec_wrapper.h | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/libavcodec/mediacodec_wrapper.h > > b/libavcodec/mediacodec_wrapper.h > > index f0de16d669..58e5dc7d39 100644 > > --- a/libavcodec/mediacodec_wrapper.h > > +++ b/libavcodec/mediacodec_wrapper.h > > @@ -26,6 +26,8 @@ > > #include > > #include > > > > > +#include > > AFAIK, this is not the correct way of including one of our own headers, > especially from the same sub-library. Just "avcodec.h". Fixed in attached patch. Thanks. -- Matthieu B. >From a18c2bb9ac6a2cc93434def1124266c92efda7ce Mon Sep 17 00:00:00 2001 From: Matthieu Bouron Date: Mon, 29 Apr 2019 11:24:37 +0200 Subject: [PATCH 1/4] avcodec/mediacodec_wrapper: add missing "avcodec.h" include --- libavcodec/mediacodec_wrapper.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mediacodec_wrapper.h b/libavcodec/mediacodec_wrapper.h index f0de16d669..b106ff315a 100644 --- a/libavcodec/mediacodec_wrapper.h +++ b/libavcodec/mediacodec_wrapper.h @@ -26,6 +26,8 @@ #include #include +#include "avcodec.h" + /** * The following API around MediaCodec and MediaFormat is based on the * NDK one provided by Google since Android 5.0. -- 2.22.0 ___ 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/4] lavd/avfoundation: Support muxed device types
Am 30.06.19 um 14:11 schrieb Thilo Borgmann: > Hi, > > some cleanup and $SUBJECT. > > Documentation and reindent follows afterwards. Will add docs and push with remarks from Moritz soonish - if there are no more comments coming in. -Thilo ___ 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] MAINTAINERS: add myself to the AMF section
On Thu, 4 Jul 2019, Hendrik Leppkes wrote: On Thu, Jul 4, 2019 at 12:42 AM Lynne wrote: NAK for reasons said on IRC For everyones benefit, why don't you actually formulate your reasons here instead of asking people to piece them together from some chat history, that way people can actually understand or respond to them. I, for one, could not find an actual reason you listed that actually applies. Also irclogs mailing list archives stopped working not long ago, maybe someone can take a look? Thanks, Marton ___ 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] avutil: add av_memcpy() to avoid undefined behavior with NULL, NULL, 0
On Wed, Jul 03, 2019 at 12:50:59PM +0200, Hendrik Leppkes wrote: > On Wed, Jul 3, 2019 at 10:46 AM Michael Niedermayer > wrote: > > > > On Wed, Jul 03, 2019 at 09:41:41AM +0200, Reimar Döffinger wrote: > > > > > > > > > On 03.07.2019, at 08:29, Michael Niedermayer > > > wrote: > > > > > > > On Tue, Jul 02, 2019 at 08:42:43PM -0300, James Almer wrote: > > > >> On 7/2/2019 5:56 PM, Michael Niedermayer wrote: > > > >>> Signed-off-by: Michael Niedermayer > > > >>> --- > > > >>> doc/APIchanges | 3 +++ > > > >>> libavutil/mem.h | 13 + > > > >>> libavutil/version.h | 2 +- > > > >>> 3 files changed, 17 insertions(+), 1 deletion(-) > > > >>> > > > >>> diff --git a/doc/APIchanges b/doc/APIchanges > > > >>> index b5fadc2a48..65b8ed74ad 100644 > > > >>> --- a/doc/APIchanges > > > >>> +++ b/doc/APIchanges > > > >>> @@ -15,6 +15,9 @@ libavutil: 2017-10-21 > > > >>> > > > >>> API changes, most recent first: > > > >>> > > > >>> +2019-07-XX - XX - lavu 56.31.100 - mem.h > > > >>> + Add av_memcpy() > > > >>> + > > > >>> 2019-06-21 - XX - lavu 56.30.100 - frame.h > > > >>> Add FF_DECODE_ERROR_DECODE_SLICES > > > >>> > > > >>> diff --git a/libavutil/mem.h b/libavutil/mem.h > > > >>> index 5fb1a02dd9..a35230360d 100644 > > > >>> --- a/libavutil/mem.h > > > >>> +++ b/libavutil/mem.h > > > >>> @@ -506,6 +506,19 @@ void *av_memdup(const void *p, size_t size); > > > >>> */ > > > >>> void av_memcpy_backptr(uint8_t *dst, int back, int cnt); > > > >>> > > > >>> +/** > > > >>> + * memcpy() implementation without a NULL pointer special case > > > >>> + * > > > >>> + * @param dst Destination buffer > > > >>> + * @param src Source buffer > > > >>> + * @param cnt Number of bytes to copy; must be >= 0 > > > >>> + */ > > > >>> +static inline void av_memcpy(void *dst, const void *src, size_t cnt) > > > >> > > > >> How many cases are there in the codebase where cnt can be 0, and dst or > > > >> src NULL, without it having been checked before calling memcpy? And > > > >> from > > > >> those, which would not be from situations where the code should have > > > >> instead aborted and returned ENOMEM, or EINVAL if either of them are > > > >> function arguments? > > > > > > > > There are around 2500 occurances of memcpy in the codebase > > > > To awnser your question it would be needed to review all of them and in > > > > many > > > > cases their surrounding code. > > > > So that is unlikely to be awnsered by anyone accuratly > > > > > > > > Also iam not sure i understand why you ask or why this would matter > > > > the suggested function allows to simplify cases where the NULL can > > > > occur, not where it cannot or should not. That is this is intended for > > > > the cases where we already have or are adding explicit checks to > > > > avoid the NULL case. > > > > > > > > i could rename this to av_memcpy_nullsafe which would make it clearer > > > > but > > > > also its more to write and read > > > > > > I admit I thought that a worthwhile idea originally, > > > but I have to think back to a long time ago that every function added to > > > our "API" has a cost of people having to know about it and how to use it. > > > And if it's currently only 2 places that would benefit I think James is > > > right to ask if it makes sense. > > > Of course another question might be if it might make sense to replace all > > > memcpy uses with it. > > > I mean, isn't it naturally expected behaviour that the pointers would be > > > ignored if the copy amount is 0? There might be a lot of code assuming > > > that we do not know about... > > > > in addition to the 2 there are these related commits found by very dumb git > > log greps > > In further addition there would be cases that deal with src == dst, > > something we > > could add a check for in av_memcpy() too > > > > Personally I really don't like hiding too much magic in a function > like this. It can easily lead to brittle code, someone may think the > pointer is always valid since its memcpy'ed to, and uses it > afterwards, and there you have a disaster. Why would someone think that a pointer to an array of length 0 is valid ? malloc(0) for example does not gurantee that > Either the function name should make perfectly clear what it does, or > preferably it should just not exist and code should just validate its > stuff. what name would you suggest ? but we can just drop this and add the checks to memcpy() where needed i was just trying to make all the undefined behaviour fixes a bit less ugly as multiple people complained ... thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data 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, o
Re: [FFmpeg-devel] [PATCH] avutil: add av_memcpy() to avoid undefined behavior with NULL, NULL, 0
On Thu, Jul 4, 2019 at 8:45 PM Michael Niedermayer wrote: > > On Wed, Jul 03, 2019 at 12:50:59PM +0200, Hendrik Leppkes wrote: > > On Wed, Jul 3, 2019 at 10:46 AM Michael Niedermayer > > wrote: > > > > > > On Wed, Jul 03, 2019 at 09:41:41AM +0200, Reimar Döffinger wrote: > > > > > > > > > > > > On 03.07.2019, at 08:29, Michael Niedermayer > > > > wrote: > > > > > > > > > On Tue, Jul 02, 2019 at 08:42:43PM -0300, James Almer wrote: > > > > >> On 7/2/2019 5:56 PM, Michael Niedermayer wrote: > > > > >>> Signed-off-by: Michael Niedermayer > > > > >>> --- > > > > >>> doc/APIchanges | 3 +++ > > > > >>> libavutil/mem.h | 13 + > > > > >>> libavutil/version.h | 2 +- > > > > >>> 3 files changed, 17 insertions(+), 1 deletion(-) > > > > >>> > > > > >>> diff --git a/doc/APIchanges b/doc/APIchanges > > > > >>> index b5fadc2a48..65b8ed74ad 100644 > > > > >>> --- a/doc/APIchanges > > > > >>> +++ b/doc/APIchanges > > > > >>> @@ -15,6 +15,9 @@ libavutil: 2017-10-21 > > > > >>> > > > > >>> API changes, most recent first: > > > > >>> > > > > >>> +2019-07-XX - XX - lavu 56.31.100 - mem.h > > > > >>> + Add av_memcpy() > > > > >>> + > > > > >>> 2019-06-21 - XX - lavu 56.30.100 - frame.h > > > > >>> Add FF_DECODE_ERROR_DECODE_SLICES > > > > >>> > > > > >>> diff --git a/libavutil/mem.h b/libavutil/mem.h > > > > >>> index 5fb1a02dd9..a35230360d 100644 > > > > >>> --- a/libavutil/mem.h > > > > >>> +++ b/libavutil/mem.h > > > > >>> @@ -506,6 +506,19 @@ void *av_memdup(const void *p, size_t size); > > > > >>> */ > > > > >>> void av_memcpy_backptr(uint8_t *dst, int back, int cnt); > > > > >>> > > > > >>> +/** > > > > >>> + * memcpy() implementation without a NULL pointer special case > > > > >>> + * > > > > >>> + * @param dst Destination buffer > > > > >>> + * @param src Source buffer > > > > >>> + * @param cnt Number of bytes to copy; must be >= 0 > > > > >>> + */ > > > > >>> +static inline void av_memcpy(void *dst, const void *src, size_t > > > > >>> cnt) > > > > >> > > > > >> How many cases are there in the codebase where cnt can be 0, and dst > > > > >> or > > > > >> src NULL, without it having been checked before calling memcpy? And > > > > >> from > > > > >> those, which would not be from situations where the code should have > > > > >> instead aborted and returned ENOMEM, or EINVAL if either of them are > > > > >> function arguments? > > > > > > > > > > There are around 2500 occurances of memcpy in the codebase > > > > > To awnser your question it would be needed to review all of them and > > > > > in many > > > > > cases their surrounding code. > > > > > So that is unlikely to be awnsered by anyone accuratly > > > > > > > > > > Also iam not sure i understand why you ask or why this would matter > > > > > the suggested function allows to simplify cases where the NULL can > > > > > occur, not where it cannot or should not. That is this is intended for > > > > > the cases where we already have or are adding explicit checks to > > > > > avoid the NULL case. > > > > > > > > > > i could rename this to av_memcpy_nullsafe which would make it clearer > > > > > but > > > > > also its more to write and read > > > > > > > > I admit I thought that a worthwhile idea originally, > > > > but I have to think back to a long time ago that every function added > > > > to our "API" has a cost of people having to know about it and how to > > > > use it. > > > > And if it's currently only 2 places that would benefit I think James is > > > > right to ask if it makes sense. > > > > Of course another question might be if it might make sense to replace > > > > all memcpy uses with it. > > > > I mean, isn't it naturally expected behaviour that the pointers would > > > > be ignored if the copy amount is 0? There might be a lot of code > > > > assuming that we do not know about... > > > > > > in addition to the 2 there are these related commits found by very dumb > > > git log greps > > > In further addition there would be cases that deal with src == dst, > > > something we > > > could add a check for in av_memcpy() too > > > > > > > Personally I really don't like hiding too much magic in a function > > like this. It can easily lead to brittle code, someone may think the > > pointer is always valid since its memcpy'ed to, and uses it > > afterwards, and there you have a disaster. > > Why would someone think that a pointer to an array of length 0 is valid ? > malloc(0) for example does not gurantee that > Why would someone memcpy a array of length 0? Because they didn't realize that it may be zero. You seem to view this as intentional code with the full knowledge that it may be zero, but I would rather argue that most people just didn't consider this special case, instead of willingly running into errorneous usage of memcpy. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsub
Re: [FFmpeg-devel] [PATCH] MAINTAINERS: add myself to the AMF section
Hi everybody. Let me explain reasons here. About AMF: 1) AMF is a light-weight, portable multimedia framework that provides access to AMD hardware accelerated encoder, decoder, converters/filters. 2) AMF abstracts away most of the platform and API-specific details and allows for easy implementation of multimedia applications using a variety of technologies, such as DirectX 11, OpenGL, and OpenCL, Vulkan and facilitates an efficient interop between them. 3) It is very useful to use AMF as part of FFmpeg framework together with numerous FFmpeg features About myself 1) I was one of originators/architects of AMF and implemented core modules 2) I fixed few issues in amfenc integration in FFmpeg 3) I implemented integrations of AMF decoder, converter/scaler to FFmpeg. Unfortunately they were not applied yet. 4) I appreciate feedback, open for discussions, and ready to follow the rules of community Proposed plan about AMF here 1) Add Linux support (via Vulkan) 2) Add AMD decoder, scaler, converter 3) Connect continuous integration server to execute tests and keep it stable Thanks, Alexander ___ 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] avcodec/hevc_ps: fix valid range of num_tile_{columns, rows}_minus1
On 6/30/2019 5:45 PM, James Almer wrote: > From 7.4.3.3.1: > > num_tile_columns_minus1 shall be in the range of 0 to PicWidthInCtbsY - 1, > inclusive. > num_tile_rows_minus1 shall be in the range of 0 to PicHeightInCtbsY - 1, > inclusive. > > Signed-off-by: James Almer > --- > Sorry for not noticing it when reviewing c692051252 and 3b2082c663. > > libavcodec/hevc_ps.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c > index f6e80e1609..abf08b919b 100644 > --- a/libavcodec/hevc_ps.c > +++ b/libavcodec/hevc_ps.c > @@ -1588,14 +1588,14 @@ int ff_hevc_decode_nal_pps(GetBitContext *gb, > AVCodecContext *avctx, > int num_tile_rows_minus1= get_ue_golomb(gb); > > if (num_tile_columns_minus1 < 0 || > -num_tile_columns_minus1 >= sps->ctb_width - 1) { > +num_tile_columns_minus1 >= sps->ctb_width) { > av_log(avctx, AV_LOG_ERROR, "num_tile_columns_minus1 out of > range: %d\n", > num_tile_columns_minus1); > ret = num_tile_columns_minus1 < 0 ? num_tile_columns_minus1 : > AVERROR_INVALIDDATA; > goto err; > } > if (num_tile_rows_minus1 < 0 || > -num_tile_rows_minus1 >= sps->ctb_height - 1) { > +num_tile_rows_minus1 >= sps->ctb_height) { > av_log(avctx, AV_LOG_ERROR, "num_tile_rows_minus1 out of range: > %d\n", > num_tile_rows_minus1); > ret = num_tile_rows_minus1 < 0 ? num_tile_rows_minus1 : > AVERROR_INVALIDDATA; > Will push soon. ___ 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] [PATCH 2/3] avcodec/vc1_block: Fix integer overflow in ff_vc1_pred_dc()
Fixes: signed integer overflow: 32796 * 65536 cannot be represented in type 'int' Fixes: 15430/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5735424087031808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/vc1_block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 86320db959..3078ce20cc 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -430,12 +430,12 @@ static inline int ff_vc1_pred_dc(MpegEncContext *s, int overlap, int pq, int n, if (c_avail && (n != 1 && n != 3)) { q2 = FFABS(s->current_picture.qscale_table[mb_pos - 1]); if (q2 && q2 != q1) -c = (c * s->y_dc_scale_table[q2] * ff_vc1_dqscale[dqscale_index] + 0x2) >> 18; +c = (int)((unsigned)c * s->y_dc_scale_table[q2] * ff_vc1_dqscale[dqscale_index] + 0x2) >> 18; } if (a_avail && (n != 2 && n != 3)) { q2 = FFABS(s->current_picture.qscale_table[mb_pos - s->mb_stride]); if (q2 && q2 != q1) -a = (a * s->y_dc_scale_table[q2] * ff_vc1_dqscale[dqscale_index] + 0x2) >> 18; +a = (int)((unsigned)a * s->y_dc_scale_table[q2] * ff_vc1_dqscale[dqscale_index] + 0x2) >> 18; } if (a_avail && c_avail && (n != 3)) { int off = mb_pos; @@ -445,7 +445,7 @@ static inline int ff_vc1_pred_dc(MpegEncContext *s, int overlap, int pq, int n, off -= s->mb_stride; q2 = FFABS(s->current_picture.qscale_table[off]); if (q2 && q2 != q1) -b = (b * s->y_dc_scale_table[q2] * ff_vc1_dqscale[dqscale_index] + 0x2) >> 18; +b = (int)((unsigned)b * s->y_dc_scale_table[q2] * ff_vc1_dqscale[dqscale_index] + 0x2) >> 18; } if (c_avail && (!a_avail || abs(a - b) <= abs(b - c))) { -- 2.22.0 ___ 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] [PATCH 3/3] avcodec/utils: fix leak of subtitle_header on error path
Fixes: memleak Fixes: 15528/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_STL_fuzzer-5735993371525120 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 1b1feca38c..56ff70b744 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1038,6 +1038,7 @@ FF_ENABLE_DEPRECATION_WARNINGS av_dict_free(&tmp); av_freep(&avctx->priv_data); +av_freep(&avctx->subtitle_header); if (avctx->internal) { av_frame_free(&avctx->internal->to_free); av_frame_free(&avctx->internal->compat_decode_frame); -- 2.22.0 ___ 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] [PATCH 1/3] avformat/utils: Check rfps_duration_sum for overflow
Fixes: signed integer overflow: 9151595917793558550 + 297519050751678697 cannot be represented in type 'long' Fixes: 15496/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5722866475073536 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 886cd6fd83..2e8b2e8a0b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3347,8 +3347,10 @@ int ff_rfps_add_frame(AVFormatContext *ic, AVStream *st, int64_t ts) } } } -st->info->duration_count++; -st->info->rfps_duration_sum += duration; +if (st->info->rfps_duration_sum <= INT64_MAX - duration) { +st->info->duration_count++; +st->info->rfps_duration_sum += duration; +} if (st->info->duration_count % 10 == 0) { int n = st->info->duration_count; -- 2.22.0 ___ 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] MAINTAINERS: add myself to the AMF section
> -Original Message- > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > Of Marton Balint > Sent: Friday, July 5, 2019 2:27 AM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH] MAINTAINERS: add myself to the AMF > section > > > On Thu, 4 Jul 2019, Hendrik Leppkes wrote: > > > On Thu, Jul 4, 2019 at 12:42 AM Lynne wrote: > >> > >> NAK for reasons said on IRC > > > > For everyones benefit, why don't you actually formulate your reasons > > here instead of asking people to piece them together from some chat > > history, that way people can actually understand or respond to them. > > I, for one, could not find an actual reason you listed that actually > > applies. > > Also irclogs mailing list archives stopped working not long ago, maybe > someone can take a look? Burek said he will take a look at the issue. > > Thanks, > Marton > ___ > 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 v1] lavc/libdavs2.c: optimize frame copy
> -Original Message- > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > Of hwrenx > Sent: Wednesday, July 3, 2019 11:24 AM > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH v1] lavc/libdavs2.c: optimize frame copy > I think it's better to use "correct ..." or "fix ..." instead of "optimize" in the title. Maybe a short commit message here would be useful for reviewer. > Signed-off-by: hwrenx > --- > libavcodec/libdavs2.c | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c > index 218f3ec..15ed3a1 100644 > --- a/libavcodec/libdavs2.c > +++ b/libavcodec/libdavs2.c > @@ -62,7 +62,7 @@ static int davs2_dump_frames(AVCodecContext *avctx, > davs2_picture_t *pic, int *g > davs2_seq_info_t *headerset, int ret_type, > AVFrame *frame) > { > DAVS2Context *cad= avctx->priv_data; > -int bytes_per_sample = pic->bytes_per_sample; > +int bytes_per_sample = pic->bytes_per_sample == 8 ? 1 : 2; > int plane = 0; > int line = 0; > > @@ -104,6 +104,7 @@ static int davs2_dump_frames(AVCodecContext > *avctx, davs2_picture_t *pic, int *g > > for (plane = 0; plane < 3; ++plane) { > int size_line = pic->widths[plane] * bytes_per_sample; > +void *dst, *src; > frame->buf[plane] = av_buffer_alloc(size_line * pic->lines[plane]); > > if (!frame->buf[plane]){ > @@ -114,10 +115,14 @@ static int davs2_dump_frames(AVCodecContext > *avctx, davs2_picture_t *pic, int *g > frame->data[plane] = frame->buf[plane]->data; > frame->linesize[plane] = size_line; > Did you observe performance difference with only below lines of change? If it is just for code cleanup, it's better to split this into separate patch. Thanks! Ruiling > -for (line = 0; line < pic->lines[plane]; ++line) > -memcpy(frame->data[plane] + line * size_line, > - pic->planes[plane] + line * pic->strides[plane], > - pic->widths[plane] * bytes_per_sample); > +dst = frame->data[plane]; > +src = pic->planes[plane]; > + > +for (line = 0; line < pic->lines[plane]; ++line) { > +memcpy(dst, src, size_line); > +dst += size_line; > +src += pic->strides[plane]; > +} > } > > frame->width = cad->headerset.width; > -- > 2.7.4 > > ___ > 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 v4] vf_drawtext: Add pkt_pos, pkt_duration, pkt_size as variables
> If the joined version is preferred it's been submitted at > http://ffmpeg.org/pipermail/ffmpeg-devel/2019-June/245662.html Pinging. Would it be possible to get one of these two versions applied, if no other changes are required? ___ 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] [PATCH V1 1/2] lavfi/scale: Add sub-options for in_color_matrix/out_color_matrix
From: Jun Zhao Add sub-options for in_color_matrix/out_color_matrix Signed-off-by: Jun Zhao --- libavfilter/vf_scale.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index f741419..7aebf56 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -572,8 +572,16 @@ static const AVOption scale_options[] = { { "interl", "set interlacing", OFFSET(interlaced), AV_OPT_TYPE_BOOL, {.i64 = 0 }, -1, 1, FLAGS }, { "size", "set video size", OFFSET(size_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, FLAGS }, { "s", "set video size", OFFSET(size_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, FLAGS }, -{ "in_color_matrix", "set input YCbCr type", OFFSET(in_color_matrix), AV_OPT_TYPE_STRING, { .str = "auto" }, .flags = FLAGS }, -{ "out_color_matrix", "set output YCbCr type", OFFSET(out_color_matrix), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = FLAGS }, +{ "in_color_matrix", "set input YCbCr type", OFFSET(in_color_matrix), AV_OPT_TYPE_STRING, { .str = "auto" }, .flags = FLAGS, "color" }, +{ "out_color_matrix", "set output YCbCr type", OFFSET(out_color_matrix), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = FLAGS, "color"}, +{ "auto",NULL, 0, AV_OPT_TYPE_CONST, { .str = "auto" }, 0, 0, FLAGS, "color" }, +{ "bt601", NULL, 0, AV_OPT_TYPE_CONST, { .str = "bt601" }, 0, 0, FLAGS, "color" }, +{ "bt470", NULL, 0, AV_OPT_TYPE_CONST, { .str = "bt470" }, 0, 0, FLAGS, "color" }, +{ "smpte170m", NULL, 0, AV_OPT_TYPE_CONST, { .str = "smpte170m" }, 0, 0, FLAGS, "color" }, +{ "bt709", NULL, 0, AV_OPT_TYPE_CONST, { .str = "bt709" }, 0, 0, FLAGS, "color" }, +{ "fcc", NULL, 0, AV_OPT_TYPE_CONST, { .str = "fcc" }, 0, 0, FLAGS, "color" }, +{ "smpte240m", NULL, 0, AV_OPT_TYPE_CONST, { .str = "smpte240m" }, 0, 0, FLAGS, "color" }, +{ "bt2020", NULL, 0, AV_OPT_TYPE_CONST, { .str = "bt2020" }, 0, 0, FLAGS, "color" }, { "in_range", "set input color range", OFFSET( in_range), AV_OPT_TYPE_INT, {.i64 = AVCOL_RANGE_UNSPECIFIED }, 0, 2, FLAGS, "range" }, { "out_range", "set output color range", OFFSET(out_range), AV_OPT_TYPE_INT, {.i64 = AVCOL_RANGE_UNSPECIFIED }, 0, 2, FLAGS, "range" }, { "auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_UNSPECIFIED }, 0, 0, FLAGS, "range" }, -- 1.7.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 v4] vf_drawtext: Add pkt_pos, pkt_duration, pkt_size as variables
On 05-07-2019 07:32 AM, greg Luce wrote: If the joined version is preferred it's been submitted at http://ffmpeg.org/pipermail/ffmpeg-devel/2019-June/245662.html Pinging. Would it be possible to get one of these two versions applied, if no other changes are required? Will test and apply. Gyan ___ 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] [PATCH V1 2/2] doc/filters: Document missing options for scale in/out color matrix
From: Jun Zhao Document missing options for scale in/out color matrix Signed-off-by: Jun Zhao --- doc/filters.texi |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 700a76f..b7dec47 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -15151,6 +15151,8 @@ Set color space conforming to the United States Federal Communications Commission (FCC) Code of Federal Regulations (CFR) Title 47 (2003) 73.682 (a). @item bt601 +@item bt470 +@item smpte170m Set color space conforming to: @itemize @@ -15167,6 +15169,9 @@ Society of Motion Picture and Television Engineers (SMPTE) ST 170:2004 @item smpte240m Set color space conforming to SMPTE ST 240:1999. + +@item bt2020 +Set color space conforming to ITU-R BT2020 non-constant luminance system. @end table @item in_range -- 1.7.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 V1 2/2] doc/filters: Document missing options for scale in/out color matrix
On 05-07-2019 10:06 AM, Jun Zhao wrote: From: Jun Zhao Document missing options for scale in/out color matrix Signed-off-by: Jun Zhao --- doc/filters.texi |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 700a76f..b7dec47 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -15151,6 +15151,8 @@ Set color space conforming to the United States Federal Communications Commission (FCC) Code of Federal Regulations (CFR) Title 47 (2003) 73.682 (a). @item bt601 +@item bt470 +@item smpte170m Set color space conforming to: @itemize @@ -15167,6 +15169,9 @@ Society of Motion Picture and Television Engineers (SMPTE) ST 170:2004 @item smpte240m Set color space conforming to SMPTE ST 240:1999. + +@item bt2020 +Set color space conforming to ITU-R BT2020 non-constant luminance system. s/BT2020/BT.2020. Rest LGTM. @end table @item in_range ___ 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".