[FFmpeg-devel] [PATCH 3/3] Add assert that the avcodec lock isheld when initializing static VLC tables.

Don Moir donmoir at comcast.net
Mon Dec 3 14:09:10 CET 2012


>> Do I need a bug report for this ?

> If you get an assert failure, yes, you should submit a bug report.

Now that I know I can trap av_log thru AV_LOG_FATAL I will have something to report if it happens.

Mostly I turn off all calls made by av_log because its just not useful outside of debugging and missed the point of AV_LOG_FATAL 
which is useful.

>> Would be good if rather than calling av_log in av_assert0 , the
>> condition, file, and line number was passed back to the app

> No. When an assert failure is reached, there is _nothing_ to do. An assert
> failure means that some piece of code did something that it was not supposed
> to do. At this point, the memory may be corrupted anywhere, and continuing
> anything in the application is a risk of making things worse, and in
> particular a possibility of security exploit. Even printing the file and
> line is a risk.

You are saying then av_log should not be called either which av_assert0 does and no one should use av_assert0 ? just messin with you 
:)

I looked at a random sample of the av_assert0 calls. I think everyone I looked at was a simple case that should not cause any 
problem with addtional logging. Perhaps if there is some case where you have determined that something is corruputed, it should use 
a different assert ?




More information about the ffmpeg-devel mailing list