ffmpeg | branch: master | Zhao Zhili <zhiliz...@tencent.com> | Tue Sep 24 
00:16:13 2024 +0800| [f56a54387b9cea884ca139e9cb993ff6989b8def] | committer: 
Zhao Zhili

avformat/img2enc: Fix integer truncation when frame_pts is enabled

Signed-off-by: Zhao Zhili <zhiliz...@tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f56a54387b9cea884ca139e9cb993ff6989b8def
---

 libavformat/img2enc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index 526a11e5ee..41638d92b8 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -160,13 +160,13 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
             return AVERROR(EINVAL);
         }
     } else if (img->frame_pts) {
-        if (av_get_frame_filename2(filename, sizeof(filename), s->url, 
pkt->pts, AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) {
+        if (ff_get_frame_filename(filename, sizeof(filename), s->url, 
pkt->pts, AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) {
             av_log(s, AV_LOG_ERROR, "Cannot write filename by pts of the 
frames.");
             return AVERROR(EINVAL);
         }
-    } else if (av_get_frame_filename2(filename, sizeof(filename), s->url,
-                                      img->img_number,
-                                      AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) {
+    } else if (ff_get_frame_filename(filename, sizeof(filename), s->url,
+                                     img->img_number,
+                                     AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) {
         if (img->img_number == img->start_img_number) {
             av_log(s, AV_LOG_WARNING, "The specified filename '%s' does not 
contain an image sequence pattern or a pattern is invalid.\n", s->url);
             av_log(s, AV_LOG_WARNING,

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to