[FFmpeg-devel] [PATCH] Wideband Single-bit Data (WSD) demuxer
Carl Eugen Hoyos
cehoyos at ag.or.at
Fri Apr 18 11:01:31 CEST 2014
Peter Ross <pross <at> xvid.org> writes:
> +static int wsd_probe(AVProbeData *p)
> +{
> + if (p->buf_size < 45 || memcmp(p->buf, "1bit", 4) ||
> + !AV_RB32(p->buf + 36) || !p->buf[44] ||
> + (p->buf[0] >= 0x10 && (AV_RB32(p->buf + 20) < 0x80 ||
Isn't p->buf[0] already checked above?
> AV_RB32(p->buf + 24) < 0x80)))
> + return 0;
> + return AVPROBE_SCORE_MAX;
AVPROBE_SCORE_MAX seems too much to me.
> +static int wsd_to_av_channel_layoyt
Seems to be a typo: layout
> + switch (bit) {
> + case 2: return AV_CH_BACK_RIGHT;
> + case 3:
> + avpriv_request_sample(s, "Rr-middle");
> + break;
> + case 4: return AV_CH_BACK_CENTER;
> + case 5:
> + avpriv_request_sample(s, "Lr-middle");
> + break;
> + case 6: return AV_CH_BACK_LEFT;
> + case 24: return AV_CH_LOW_FREQUENCY;
> + case 26: return AV_CH_FRONT_RIGHT;
> + case 27: return AV_CH_FRONT_RIGHT_OF_CENTER;
> + case 28: return AV_CH_FRONT_CENTER;
> + case 29: return AV_CH_FRONT_LEFT_OF_CENTER;
> + case 30: return AV_CH_FRONT_LEFT;
I would have expected AV_CH_SIDE_* in the list.
Aren't Rr-middle and Lr-middle side channels?
> + av_timecode_make_smpte_tc_string(playback_time, avio_rb32(pb), 0);
> + av_dict_set(&s->metadata, "playback_time", playback_time, 0);
AVStream->duration or do I misunderstand?
Carl Eugen
More information about the ffmpeg-devel
mailing list