[Libav-user] (Bug?) Questions about error processing during hardware assisted decoding of H264

wl2776 wl2776 at gmail.com
Thu Mar 15 07:15:17 CET 2012


Hi all. 
I was trying to ak this question in libav-api mailing list, but with no
answer.

I'd like to draw your attention to the function field_end(), located in the
file libavcodec/h264.c 

http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/h264.c;h=66174778df67f1f946b1f217c1bbcb2a64748691;hb=HEAD#l2503

Lines 2528 - 2531 contain call to the end_frame function, processing its
return code and writing diagnostic message. 

However, the function return code, stored in the variable err, doesn't
depend on this error code. 

So, for me, it's obvious bug here.
Beacuse of it, in my application, I'm often getting error messages about
"hardware accelerator failed to decode", and positive result of the call to
avcodec_decode_video2() (got_picture flag is positive).
As a result, my application draws green rectangles instead of dropping
invalid frames. 

Is such behavior by design? 

I tried patching this by assigning err to the return code of the
end_frame(), but it didn't help since return code of the field_end()
function is entirely ignored.

My patch is this: 


Could anyone advise me a solution on the best way to signal these errors to
the application?

Thanks.

--
View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-Bug-Questions-about-error-processing-during-hardware-assisted-decoding-of-H264-tp4474014p4474014.html
Sent from the libav-users mailing list archive at Nabble.com.


More information about the Libav-user mailing list