[FFmpeg-devel] [PATCH] ffplay: change type for channels and channel_layout AudioParams fields
Stefano Sabatini
stefasab at gmail.com
Sun Feb 3 21:30:11 CET 2013
Switch from int to int64_t, to better reflect the type of the
corresponding fields in lavc/lavfi.
---
ffplay.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index 0f0170f..199b0f6 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -135,8 +135,8 @@ typedef struct SubPicture {
typedef struct AudioParams {
int freq;
- int channels;
- int channel_layout;
+ int64_t channels;
+ int64_t channel_layout;
enum AVSampleFormat fmt;
} AudioParams;
@@ -2152,9 +2152,9 @@ static int audio_decode_frame(VideoState *is)
dec_channel_layout, is->frame->format, is->frame->sample_rate,
0, NULL);
if (!is->swr_ctx || swr_init(is->swr_ctx) < 0) {
- fprintf(stderr, "Cannot create sample rate converter for conversion of %d Hz %s %d channels to %d Hz %s %d channels!\n",
- is->frame->sample_rate, av_get_sample_fmt_name(is->frame->format), (int)is->frame->channels,
- is->audio_tgt.freq, av_get_sample_fmt_name(is->audio_tgt.fmt), is->audio_tgt.channels);
+ fprintf(stderr, "Cannot create sample rate converter for conversion of %d Hz %s %"PRId64" channels to %d Hz %s %"PRId64" channels!\n",
+ is->frame->sample_rate, av_get_sample_fmt_name(is->frame->format), is->frame->channels,
+ is->audio_tgt.freq, av_get_sample_fmt_name(is->audio_tgt.fmt), is->audio_tgt.channels);
break;
}
is->audio_src.channel_layout = dec_channel_layout;
--
1.7.9.5
More information about the ffmpeg-devel
mailing list