Message ID | 20240312154738.2360856-1-marth64@proxyid.net |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,v2] avformat/dvdvideodec: use int64_t for menu blocks_read and fix format statement | 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 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c > index a182f95097..19efc068cb 100644 > --- a/libavformat/dvdvideodec.c > +++ b/libavformat/dvdvideodec.c > @@ -392,7 +392,7 @@ static int dvdvideo_menu_next_ps_block(AVFormatContext *s, DVDVideoPlaybackState > uint8_t *buf, int buf_size, > void (*flush_cb)(AVFormatContext *s)) > { > - ssize_t blocks_read = 0; > + int64_t blocks_read = 0; > uint8_t read_buf[DVDVIDEO_BLOCK_SIZE] = {0}; > pci_t pci = (pci_t) {0}; > dsi_t dsi = (dsi_t) {0}; > @@ -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; ld is for long, not necessarily for int64_t. - Andreas
Fix on the way with PRId64
diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c index a182f95097..19efc068cb 100644 --- a/libavformat/dvdvideodec.c +++ b/libavformat/dvdvideodec.c @@ -392,7 +392,7 @@ static int dvdvideo_menu_next_ps_block(AVFormatContext *s, DVDVideoPlaybackState uint8_t *buf, int buf_size, void (*flush_cb)(AVFormatContext *s)) { - ssize_t blocks_read = 0; + int64_t blocks_read = 0; uint8_t read_buf[DVDVIDEO_BLOCK_SIZE] = {0}; pci_t pci = (pci_t) {0}; dsi_t dsi = (dsi_t) {0}; @@ -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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)