int out_count = (int64_t)wanted_nb_samples * is->audio_tgt.freq / is->frame->sample_rate + 256;
int out_size = av_samples_get_buffer_size(NULL, is->audio_tgt.channels, out_count, is->audio_tgt.fmt, 0);
int len2;
+ if (out_size < 0) {
+ fprintf(stderr, "av_samples_get_buffer_size() failed\n");
+ break;
+ }
if (wanted_nb_samples != is->frame->nb_samples) {
if (swr_set_compensation(is->swr_ctx, (wanted_nb_samples - is->frame->nb_samples) * is->audio_tgt.freq / is->frame->sample_rate,
wanted_nb_samples * is->audio_tgt.freq / is->frame->sample_rate) < 0) {
}
av_init_packet(&flush_pkt);
- flush_pkt.data = (char *)(intptr_t)"FLUSH";
+ flush_pkt.data = (uint8_t *)&flush_pkt;
is = stream_open(input_filename, file_iformat);
if (!is) {