Markus Rechberger wrote:
> On Mon, Dec 15, 2008 at 8:20 AM, Luca Abeni <[email protected]> wrote:
>> Peeyush Mishra wrote:
>>> Hi all,
>>>
>>> I am working on a Distance Learning Application , I have encoded raw data
>>> into MPEG4 format , But now when I am trying to encode uncompressed audio
>>> data coming from /dev/dsp/  but it is not working at all ,,,
>> As you do not say what "is not working at all", which kind of problems
>> you are experiencing, etc... it is kind of difficult to give suggestions.
>> Anyway, your program is almost working here, but it is sampling audio at
>> the wrong rate (so, the output file plays too fast).
>>
> I think he tries to encode too much bytes at once, dividing it by 2
> makes a few chunks
> encoding fine although the encoding still crashes.. haven't had a
> further look at it yet..

Double looking at it, there are two problems:
1) in_buffer is an array of integers, but the index used for accessing it
    (frame_byte_size*i) is computed thinking that it is an array of bytes...
    Fixing this problem, the most subtle crash goes away
2) there is a meaningless "fclose(f)" in the code... Removing it, the other
    crash is fixed


I still think that this program is searching for problems, and that using
libavdevice would be a superior solution.


                                        Luca
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to