[FFmpeg-devel] [PATCH] avformat/dvdvideodec: use correct format string for menu read error, fixes compiler warning
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Tue Mar 12 17:42:16 EET 2024
Marth64:
> Signed-off-by: Marth64 <marth64 at proxyid.net>
> ---
> libavformat/dvdvideodec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c
> index a182f95097..0ae2110cd2 100644
> --- a/libavformat/dvdvideodec.c
> +++ b/libavformat/dvdvideodec.c
> @@ -423,7 +423,7 @@ static int dvdvideo_menu_next_ps_block(AVFormatContext *s, DVDVideoPlaybackState
>
> blocks_read = DVDReadBlocks(state->vob_file, state->sector_offset, 1, read_buf);
> if (blocks_read != 1) {
> - av_log(s, AV_LOG_ERROR, "Unable to read VOB block: offset=%d blocks_read=%d\n",
> + av_log(s, AV_LOG_ERROR, "Unable to read VOB block: offset=%d blocks_read=%ld\n",
> state->sector_offset, blocks_read);
>
> return AVERROR_INVALIDDATA;
blocks_read is ssize_t and therefore the correct specifier is "%zd", but
unfortunately that is not supported by all implementations (see
SIZE_SPECIFIER in lavu/internal.h). Just use an int64_t instead.
- Andreas
More information about the ffmpeg-devel
mailing list