[Ffmpeg-devel] [PATCH] Add fact chunk to non-PCM wav

Michel Bardiaux mbardiaux
Mon Feb 12 15:30:39 CET 2007


Michael Niedermayer wrote:
> Hi
> 
>>> the fact chunk should be ommited if url_is_streamed() as we wont be able to
>>> fill it later ...
>> As I read it, the MS spec does not make any exception about FACT being 
>> mandatory. To me it means WAV is simply not intended to be streamed, and 
>>  any attempt to stream a WAV should simply be killed at the very start. 
>> Unless someone can show me an example where a WAV (non-PCM) is streamed?
>>
>> Anyway, the existing code already used start_tag/end_tag for the 'fmt ' 
>> chunk, at that uses url_fseek.
> 
> libavformat has a internal buffer and url_fseek() over a small distance
> can be done with no "external" seeks, anyway just try
> ffmpeg -i foobar -f wav - >test.wav
> or something like that 

I'll take your word for it, until more definite evidence is available: 
some ukase from MS, or alternately a streaming URL that spits WAV.

> hmm indeed, sorry, but i still would suggest
> 
> if(pkt->pts != AV_NOPTS_VALUE){
>     context->maxpts= FFMAX(context->maxpts, pkt->pts);
>     context->minpts= FFMAX(context->minpts, pkt->pts);
> }else
>     av_log(s, AV_LOG_INFO, "wav_write_packet: NOPTS\n");

Fine.

Revised patch attached (as I said before, without regression fixes, I 
will add them as soon as this is nihil obstat).

>> BTW I feel that the 'assert' should be hunted down even more ruthlessly 
>> as the dprintf. What do you think?
> 
> some asserts are inappropriate they surely should be hunted down, others
> are valid and should not

I meant 'hunt assert to replace it by if+av_log+appropriate rror 
return'. Most people 'configure' in such a way that 'assert' is a nop. 
But maybe this should be shifted to a new thread?

Greetings,
-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lavf_fact_2.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070212/0d2ab4d9/attachment.txt>



More information about the ffmpeg-devel mailing list