[FFmpeg-trac] #1071(avcodec:new): Error return code from hardware decoder is ignored in h264 decoder

FFmpeg trac at avcodec.org
Thu Mar 15 07:49:09 CET 2012


#1071: Error return code from hardware decoder is ignored in h264 decoder
-------------------------------------+-------------------------------------
             Reporter:  wl2776       |                     Type:  defect
               Status:  new          |                 Priority:  important
            Component:  avcodec      |                  Version:  git-
             Keywords:  h264         |  master
  hardware acceleration decoding     |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 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.

 Moreover, return code of the function field_end is entirely ignored.
 This function is called from

 static int decode_frame()
 (file libavcodec/h264.c, line 4037
 http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/h264.c;h=66174778df67f1f946b1f217c1bbcb2a64748691;hb=HEAD#l4037
 )

 and

 static int decode_slice_header()
 (file libavcodec/h264.c, line 2621
 http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/h264.c;h=66174778df67f1f946b1f217c1bbcb2a64748691;hb=HEAD#l2621
 )

 So, when an application calls avcodec_decode_video2() and the hardware
 decoder cannot decode frame, the application anyway receives got_picture =
 1, but the frame is bad.

 It my case the frame is filled with zeros, resulting in green rectangles.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1071>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list