[FFmpeg-devel] [PATCH v2 2/2] avformat/hlsenc: expand the scope of flags from int32_t to int64_t

"zhilizhao(赵志立)" quinkblack at foxmail.com
Sun May 8 13:22:10 EEST 2022



> On May 8, 2022, at 9:17 AM, Steven Liu <lq at chinaffmpeg.org> wrote:
> 
> because the flags in AVOption support i64.
> 
> Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> ---
> libavformat/hlsenc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index b9f79e30d8..00645ae74e 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -202,7 +202,7 @@ typedef struct HLSContext {
>     int64_t init_time;     // Set by a private option.
>     int max_nb_segments;   // Set by a private option.
>     int hls_delete_threshold; // Set by a private option.
> -    uint32_t flags;        // enum HLSFlags
> +    uint64_t flags;        // enum HLSFlags

Actually it should be int here.

Firstly, AV_OPT_TYPE_FLAGS is accessed as int in opt.c.
uint64_t only works with little endian system.

Secondly, enum HLSFlags cannot has value larger than int.

>     uint32_t pl_type;      // enum PlaylistType
>     char *segment_filename;
>     char *fmp4_init_filename;
> -- 
> 2.34.1
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-devel mailing list