On Tue, 2011-12-20 at 20:42 -0600, Phillip Blucas wrote: > This newer format is used by Harris NEXIO playout servers. > --- > Changelog | 1 + > libavformat/lxfdec.c | 55 ++++++++++++++++++++++++++++++++++--------------- > 2 files changed, 39 insertions(+), 17 deletions(-)
Audio doesn't seem to work for some v1 files, such as: http://titan.codemill.se/~tomhar/samples/lxf/BARS01.lxf http://titan.codemill.se/~tomhar/samples/lxf/F0015132.lxf I'm not sure if they actually have audio though. Video works fine for all samples I have though, and all v0 samples with just as well as before. > @@ -185,8 +197,14 @@ static int get_packet_header(AVFormatContext *s, uint8_t > *header, uint32_t *form > avpriv_set_pts_info(s->streams[0], 64, 1, 25); > } > > - //TODO: warning if track mask != (1 << channels) - 1? > - ret = av_popcount(AV_RL32(&header[44])) * track_size; > + channels = av_popcount(AV_RL32(&header[44])); > + if (channels != lxf->channels) { > + av_log(s, AV_LOG_DEBUG, > + "Disk segment indicates %d channels, but audio packet > contains %d.\n", > + lxf->channels, channels); > + st->codec->channels = channels = lxf->channels; > + } > + ret = channels * track_size; I don't think it's OK for a demuxer to change codec->channels after it's done parsing the header. Not sure though. The rest of the patch looks fine. /Tomas _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel