Benjamin Larsson <[email protected]> writes: > Some more work is needed but this works for me. I think we need to redo > the probing for codecs. Here we really need the sample rate from the > container to be able to decode the stream. > > The sample_rate_idx() function is written by Ronald. > > MvH > Benajmin Larsson > > diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c > index 5f9dd83..d357de8 100644 > --- a/libavcodec/aacdec.c > +++ b/libavcodec/aacdec.c > @@ -530,6 +530,23 @@ static void reset_all_predictors(PredictorState *ps) > reset_predict_state(&ps[i]); > } > > + > +static int sample_rate_idx (int rate) > +{ > + if (92017 <= rate) return 0; > + else if (75132 <= rate) return 1; > + else if (55426 <= rate) return 2; > + else if (46009 <= rate) return 3; > + else if (37566 <= rate) return 4; > + else if (27713 <= rate) return 5; > + else if (23004 <= rate) return 6; > + else if (18783 <= rate) return 7; > + else if (13856 <= rate) return 8; > + else if (11502 <= rate) return 9; > + else if (9391 <= rate) return 10; > + else return 11; > +}
What's with the weird indentation? I'd also suggest aligning things vertically in the natural way. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
