History

avformat/img2enc: Fix integer truncation when frame_pts is enabled

Zhao Zhili committed 2 years ago

Commit f56a5431 parent a2d96631 file · +4 −4Browse files

Unified · Split

libavformat/img2enc.c+4−4
@@ -160,13 +160,13 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) · 159 unmodified lines
160160 return AVERROR(EINVAL);
161161 }
162162 } else if (img->frame_pts) {
163− if (av_get_frame_filename2(filename, sizeof(filename), s->url, pkt->pts, AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) {
163+ if (ff_get_frame_filename(filename, sizeof(filename), s->url, pkt->pts, AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) {
164164 av_log(s, AV_LOG_ERROR, "Cannot write filename by pts of the frames.");
165165 return AVERROR(EINVAL);
166166 }
167− } else if (av_get_frame_filename2(filename, sizeof(filename), s->url,
168− img->img_number,
169− AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) {
167+ } else if (ff_get_frame_filename(filename, sizeof(filename), s->url,
168+ img->img_number,
169+ AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) {
170170 if (img->img_number == img->start_img_number) {
171171 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);
172172 av_log(s, AV_LOG_WARNING,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t