On 25/02/17 20:57, Nicolas George wrote:
> Le septidi 7 ventôse, an CCXXV, Mark Thompson a écrit :
>> ---
>> I hit this error case when trying to scale hwmapped dxva2 surfaces - no idea 
>> why it doesn't work, but logging the error code would make the failure 
>> slightly easier to understand from a log.
>>
>>
>>  libavfilter/vf_scale_qsv.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavfilter/vf_scale_qsv.c b/libavfilter/vf_scale_qsv.c
>> index 8ef77835d..c1c13bba8 100644
>> --- a/libavfilter/vf_scale_qsv.c
>> +++ b/libavfilter/vf_scale_qsv.c
>> @@ -544,7 +544,7 @@ static int qsvscale_filter_frame(AVFilterLink *link, 
>> AVFrame *in)
>>      } while (err == MFX_WRN_DEVICE_BUSY);
>>  
>>      if (err < 0 || !sync) {
>> -        av_log(ctx, AV_LOG_ERROR, "Error during scaling\n");
> 
>> +        av_log(ctx, AV_LOG_ERROR, "Error during scaling: %d\n", err);
> 
> Does the numeric value of the error code have any meaning for users? If
> not, I think the code needs to be translated into a human-readable
> string.

The human-readable string does not have any meaning for users either - what 
would you like them to conclude given the string "undefined behaviour"?  
(Instead of -16, the error in this case: 
<https://github.com/lu-zero/mfx_dispatch/blob/master/mfx/mfxdefs.h#L116>.)

The error code is added to make it easier for a developer to work out what went 
wrong from a log afterwards, and any interpretation of what it means is always 
going to require reading the source code.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to