[FFmpeg-devel] [PATCH v2] avformat/dvdvideodec: use int64_t for menu blocks_read and fix format statement

Marth64 marth64 at proxyid.net
Tue Mar 12 17:47:38 EET 2024


Signed-off-by: Marth64 <marth64 at 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;
-- 
2.34.1



More information about the ffmpeg-devel mailing list