Hello, 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:
struct sample_fmt_entry { enum AVSampleFormat sample_fmt; const char *fmt_be, *fmt_le; } sample_fmt_entries[] = { { AV_SAMPLE_FMT_U8, "u8", "u8" }, { AV_SAMPLE_FMT_S16, "s16be", "s16le" }, { AV_SAMPLE_FMT_S32, "s32be", "s32le" }, { AV_SAMPLE_FMT_FLT, "f32be", "f32le" }, { AV_SAMPLE_FMT_DBL, "f64be", "f64le" }, } However, ffmpeg also support other sample type that I listed as follows: { AV_SAMPLE_FMT_S16, "s16be", "s16le" }, { AV_SAMPLE_FMT_S32, "s32be", "s32le" }, { AV_SAMPLE_FMT_FLT, "f32be", "f32le" }, { AV_SAMPLE_FMT_DBL, "f64be", "f64le" }, { AV_SAMPLE_FMT_U8P, "?", "?" }, { AV_SAMPLE_FMT_S16P, "?", "?" }, { AV_SAMPLE_FMT_S32P, "?", "?" }, { AV_SAMPLE_FMT_FLTP, "?", "?" }, { AV_SAMPLE_FMT_DBLP, "?", "?" }, { AV_SAMPLE_FMT_NB, "?", "?" }, To extend the sample_fmt_entries[] in the function (int get_format_from_sample_fmt ) to include other sample ypes, what should I fill in for the items of fmt_be and fmt_le as indicated using question marks? As my understand, the information fmt_be and fmt_le are needed for ffplay command line to replay the decoded audio samples. Thanks for the help in advance, Liang
_______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user