It's only used in the codec2 demuxers, and can be simplified with an AV_RB16()
call instead.
Suggested-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
ptr[3] = 0; //flags
}
-//Returns version as a 16-bit value. 0.8 -> 0x0008
-static inline uint16_t codec2_version_from_extradata(uint8_t *ptr) {
- return (ptr[0] << 8) + ptr[1];
-}
-
static inline uint8_t codec2_mode_from_extradata(uint8_t *ptr) {
return ptr[2];
}
return ret;
}
- version = codec2_version_from_extradata(st->codecpar->extradata);
+ version = AV_RB16(st->codecpar->extradata);
if ((version >> 8) != EXPECTED_CODEC2_MAJOR_VERSION) {
avpriv_report_missing_feature(s, "Major version %i", version >> 8);
return AVERROR_PATCHWELCOME;