[Libav-user] What should I do when avcodec_decode_audio4 fails?

YIRAN LI mrfun.china at gmail.com
Mon May 15 16:57:13 EEST 2017


2017-05-15 23:38 GMT+10:00 坚定前行 <powerpan at qq.com>:

>
>
> ---Original---
>


> then simply wait for the correct time stamp… that is what i said for sync
> frame. all day out of office had 2 use mobile to reply…
>

​Thanks Powerpan,

I'll have a double check, but I doubt maybe it doesn't work.

I mean for example each packet contains 100 samples and 10th packet failed
to decode.

that means all samples in 10th packet cant de decoded, right​? so this
packet is wasted.
Next time I call avcode_decode_audio4 with 11th packet, I'll also get 100
samples in decoded frame, but that are samples after 10the packet. I need
to insert 100 silent samples before them. I mean in case of decoding
failure, unless ffmpeg does some make up internally, the user of API must
makeup himself.

Maybe I am wrong about ffmpeg command line tool because the corrupt packet
contains only few samples (about 0.016 second), maybe they are lost and
never made up, just too short to be noticed.


so you had solutions already…
>>
>>> Regards,
>>>
>>> --
>>>   Nicolas George
>>> _______________________________________________
>>> Libav-user mailing list
>>> Libav-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/libav-user
>>>
>>
>>
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
>>
>>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20170515/cd0b514e/attachment.html>


More information about the Libav-user mailing list