[Libav-user] is it possible to get a decode error
zhangjing.lm at gmail.com
Thu Jul 13 11:18:07 EEST 2017
1) The decoder call the log callback synchronous when it encounter a error
or other messages. You can change the code to log the frame number? Like
h.264, slice header has a frame_num
2) You can use AVClass->class_name to check which context logger using. Use
AVCodecContext->opaque to save your information about which decoder you are
2017-07-13 16:02 GMT+08:00 Anton Shekhovtsov <shekh.anton at gmail.com>:
> 2017-07-13 4:31 GMT+03:00 jing zhang <zhangjing.lm at gmail.com>:
>> Try set your own log callback (use av_log_set_callback), and check errors
>> in your call back function.
>> 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
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
> 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?
> Libav-user mailing list
> Libav-user at ffmpeg.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user