Message ID | 20240312153147.2330821-1-marth64@proxyid.net |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avformat/dvdvideodec: use correct format string for menu read error, fixes compiler warning | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
Marth64: > Signed-off-by: Marth64 <marth64@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
v2 on the way
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;
Signed-off-by: Marth64 <marth64@proxyid.net> --- libavformat/dvdvideodec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)