mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
lavf: more correct printf format specifiers
This commit is contained in:
parent
7caf48e036
commit
d92024f18f
26 changed files with 114 additions and 57 deletions
|
|
@ -28,6 +28,8 @@
|
|||
* http://wiki.multimedia.cx/index.php?title=Bink_Container
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "libavutil/channel_layout.h"
|
||||
#include "libavutil/intreadwrite.h"
|
||||
#include "avformat.h"
|
||||
|
|
@ -108,7 +110,9 @@ static int read_header(AVFormatContext *s)
|
|||
fps_num = avio_rl32(pb);
|
||||
fps_den = avio_rl32(pb);
|
||||
if (fps_num == 0 || fps_den == 0) {
|
||||
av_log(s, AV_LOG_ERROR, "invalid header: invalid fps (%d/%d)\n", fps_num, fps_den);
|
||||
av_log(s, AV_LOG_ERROR,
|
||||
"invalid header: invalid fps (%"PRIu32"/%"PRIu32")\n",
|
||||
fps_num, fps_den);
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
avpriv_set_pts_info(vst, 64, fps_den, fps_num);
|
||||
|
|
@ -126,7 +130,7 @@ static int read_header(AVFormatContext *s)
|
|||
|
||||
if (bink->num_audio_tracks > BINK_MAX_AUDIO_TRACKS) {
|
||||
av_log(s, AV_LOG_ERROR,
|
||||
"invalid header: more than "AV_STRINGIFY(BINK_MAX_AUDIO_TRACKS)" audio tracks (%d)\n",
|
||||
"invalid header: more than "AV_STRINGIFY(BINK_MAX_AUDIO_TRACKS)" audio tracks (%"PRIu32")\n",
|
||||
bink->num_audio_tracks);
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
|
|
@ -221,7 +225,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||
uint32_t audio_size = avio_rl32(pb);
|
||||
if (audio_size > bink->remain_packet_size - 4) {
|
||||
av_log(s, AV_LOG_ERROR,
|
||||
"frame %"PRId64": audio size in header (%u) > size of packet left (%u)\n",
|
||||
"frame %"PRId64": audio size in header (%"PRIu32") > size of packet left (%"PRIu32")\n",
|
||||
bink->video_pts, audio_size, bink->remain_packet_size);
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue