mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
CFfmpegDec::Decoder -fix possible floating point exception
This commit is contained in:
@@ -247,16 +247,20 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state,
|
||||
AVFrame *frame = NULL;
|
||||
AVPacket rpacket;
|
||||
av_init_packet(&rpacket);
|
||||
c->channel_layout = c->channel_layout ? c->channel_layout : AV_CH_LAYOUT_STEREO;
|
||||
|
||||
av_opt_set_int(swr, "in_channel_layout", c->channel_layout, 0);
|
||||
//av_opt_set_int(swr, "out_channel_layout", c->channel_layout, 0);
|
||||
av_opt_set_int(swr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0);
|
||||
av_opt_set_int(swr, "in_sample_rate", c->sample_rate, 0);
|
||||
av_opt_set_int(swr, "out_sample_rate", c->sample_rate, 0);
|
||||
av_opt_set_int(swr, "in_sample_fmt", c->sample_fmt, 0);
|
||||
av_opt_set_int(swr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);
|
||||
av_opt_set_sample_fmt(swr, "in_sample_fmt", c->sample_fmt, 0);
|
||||
av_opt_set_sample_fmt(swr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);
|
||||
|
||||
swr_init(swr);
|
||||
if (( swr_init(swr)) < 0) {
|
||||
Status=DATA_ERR;
|
||||
return Status;
|
||||
}
|
||||
|
||||
uint8_t *outbuf = NULL;
|
||||
int outsamples = 0;
|
||||
|
Reference in New Issue
Block a user