[Libav-user] is it possible to get a decode error

Anton Shekhovtsov shekh.anton at gmail.com
Thu Jul 13 11:02:47 EEST 2017


2017-07-13 4:31 GMT+03:00 jing zhang <zhangjing.lm at gmail.com>:

> Hi,
>
> Try set your own log callback (use av_log_set_callback), and check errors
> in your call back function.
>
> zj
>
> 2017-07-12 19:13 GMT+08:00 Anton Shekhovtsov <shekh.anton at gmail.com>:
>
>> I expected avcodec_receive_frame to return any kind of error code when
>> something goes wrong with a decoding. However it always returns success, I
>> can only guess there is something wrong by side effects (decoded frame not
>> updated, messages in log).
>> Is this feature supported?
>>
>>
>> _______________________________________________
>> 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
>
>
Hi, Thanks for reply, however I don't think log callback can solve this:
1) Decoding is asynchronous, not possible to know which frame is affected
from log message. Even If I knew it, the mechanism to deliver the result to
a point where it is needed (code calling avcodec_receive_frame) would be
ugly and complex.
2) Not sure log message is even associated with specific context. According
to docs maybe it has a pointer to pointer to AVClass (how is that useful?)
or not. Seems like log callback captures messages of the whole library, so
if I do multiple operations on different threads how to tell which one had
errors?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20170713/7f89d7f1/attachment.html>


More information about the Libav-user mailing list