On Tue, Nov 25, 2008 at 14:03, Yvan Labadie <[EMAIL PROTECTED]> wrote:

>
>
> Claudio Bertozzi a écrit :
>
>> hallo,
>> could someone tell me if  is possible and how to read and decode an audio
>> and/or video AVPacket from a previous created list of AVPacket read from a
>> file instead that read directly with av_read_frame function called frame
>> after frame?
>>
>>
> yes, you can store all packets in a list and read whatever packet you want
> in that list after (if your AvCodecCtx is correctly initialized)
> I join a test program I made from various examples I fouded, it's really
> basic and full of bugs but it was just to test to separate reading /
> decoding / and playing step and is only made for audio.
> in a first step it read all packets and store into a buffer
> in a second step it read all stored packets, decode them and save audio
> samples into another buffer
> and at last it play the decoded audio buffer using OSS
>
>
>  My problem is that after stored all the frame in a list of packets, when I
>> grab one and pass it at the av_decode... functions, they returned me an
>> error and never decode the frames.
>>
>>
> check if you AvCodecCtx is correctly initialized
>
>> I suppose that the av_read_... and/or av_decode_... functions write some
>> infos in the AVFormatContext or AVCodecContext functions after the read
>> and
>> decode of a packet. If that is true, what can I do to tell at the
>> structures
>> to decode the correct packet in my sequence?
>>
>> I hope to have not made too much mess in the description of my problem.
>> Please write some feedback ;)
>> bye
>>
>> claudio
>>
> I hope that help
> Yvan
>
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>
>
I want to thank you Yvan for your help and your source. It helped me to find
where the problem was. Now all works in the correct way.
Thank again

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

Reply via email to