[Fwd: wav_player.c: PJMEDIA_EWAVEUNSUPP when playing file with extra info after RIFF chunk (1.4.5)]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok fixing this is 'not so trival'.  What about writing a simple c 
program to scan wave files before
they are introduced to pjsip for this issue and correcting them so 
pjsip will work with them by
removing this information.  This link as worked for me in the past on 
a unrelated project when
I had wave files with a corrupt header.  So it might work here for 
detecting and fixing this issue
before pjsip ever sees it:
http://www.thisisnotalabel.com/How-to-Read-and-Write-WAV-Files---in-C-and-VB.php


At 05:47 AM 11/9/2009, Benny Prijono wrote:
>We don't support the extra info after DATA chunk for now, and fixing
>this is not so trivial, as we rely on EOF to know the end of the DATA.
>So if there's extra chunk after DATA, that extra chunk will be read as
>if they are audio samples. That's why these WAVs are rejected in the
>beginning.
>
>On another note, the WAV player/writer supports reading/writing
>compressed 8bit Alaw/Ulaw WAV files in addition to the usual 16bit PCM
>format.
>
>On Mon, Nov 9, 2009 at 3:22 PM, Truong Thanh Quang <quangtt at softend.vn> wrote:
> > - Using Audacity, CoolEdit (uncheck save extra infomation), Wavepad
> > (www.nch.com/wavepad) -> pjsip played OK
> > - Wave file with extra info -> pjsip returned PJMEDIA_EWAVEUNSUPP
> >     Step into src code, pjmedia return at wave_player.c line 316
> >         /* Validate length. */
> >
> >     if (wave_hdr.data_hdr.len != fport->fsize - fport->start_data) {
> >     pj_file_close(fport->fd);
> >     return PJMEDIA_EWAVEUNSUPP;
> >     }
> >
> >    At this time, wave_hdr.data_hdr.len < fport->fsize - fport->start_data
> >       + wave_hdr.data_hdr.len = 2418494
> >       + fport->fsize - fport->start_data = 2418588
> >       + fport->start_data = 44
> >    pjsip not accepts wave file with extra info, although this file is valid
> > for many players.
> >    I think this is minor bug of pjsip.
> > - I try to change src code as first mail. It works fine now. but 
> I dont know
> > that is good or not.
> >
> > Regards,
> > quang.
> >
>
>_______________________________________________
>Visit our blog: http://blog.pjsip.org
>
>pjsip mailing list
>pjsip at lists.pjsip.org
>http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux