<div dir="ltr"><div><div><div><div><div><div><div>Hello,<br><br></div>I tested the example program of demuxing for decoding audio signals and have received the information regarding "unsupported audio format for ftlp" when the input data has the extension of mp4. I checked the program and found that the example function (int get_format_from_sample_fmt ) only declare the sample format as follows:<br>
<br></div>   struct sample_fmt_entry {<br>        enum AVSampleFormat sample_fmt; const char *fmt_be, *fmt_le;<br>    } sample_fmt_entries[] = {<br>        { AV_SAMPLE_FMT_U8,  "u8",    "u8"    },<br>        { AV_SAMPLE_FMT_S16, "s16be", "s16le" },<br>
        { AV_SAMPLE_FMT_S32, "s32be", "s32le" },<br>        { AV_SAMPLE_FMT_FLT, "f32be", "f32le" },<br>        { AV_SAMPLE_FMT_DBL, "f64be", "f64le" },<br>}<br>
<br></div>However, ffmpeg also support other  sample type that I listed as follows:<br><br>        { AV_SAMPLE_FMT_S16, "s16be", "s16le" },<br>        { AV_SAMPLE_FMT_S32, "s32be", "s32le" },<br>
        { AV_SAMPLE_FMT_FLT, "f32be", "f32le" },<br>        { AV_SAMPLE_FMT_DBL, "f64be", "f64le" },<br>        { AV_SAMPLE_FMT_U8P, "?", "?" },<br>        { AV_SAMPLE_FMT_S16P,  "?", "?" },<br>
        { AV_SAMPLE_FMT_S32P,  "?", "?" },<br>        { AV_SAMPLE_FMT_FLTP, "?", "?" },<br>        { AV_SAMPLE_FMT_DBLP, "?", "?" },<br>        { AV_SAMPLE_FMT_NB, "?", "?" },<br>
<br></div>To extend the sample_fmt_entries[] in the function (int get_format_from_sample_fmt ) to include other sample ypes, <br>what should I fill in for the items of fmt_be and fmt_le as indicated using question marks?<br>
<br></div>As my understand, the information fmt_be and fmt_le are needed for ffplay command line to replay the decoded audio samples.<br><br></div>Thanks for the help in advance,<br><br></div>Liang<br></div>