<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#CCCCCC" text="#000000">
    All,<br>
    <br>
    I have h264 nalus in memory.  I can successfully make h264 annex b
    files playable with ffplay.  I want to now decode them and work with
    the frames.  All the example code I've found involves standing up
    the proper datastructures starting with the container format of an
    input file (ffplay, or demuxing_decoding.c in examples), but I'll
    need to stand up the decoder by hand.<br>
    <br>
    I've reviewed the avcodec.c in doc/examples and notice that if using
    the h264 output type in this program that decoding the test video
    and writing it to disk is skipped.  After modifying the code to
    setup the decoder as an h264 decoder instead of the mpeg1video, and
    calling the decode function, the decoder step fails with the
    following output on the console:<br>
    <br>
    Decode video file test.h264 to test%02d.pgm<br>
    [h264 @ 0x7fd22ab5ba00] Missing reference picture, default is 0<br>
    [h264 @ 0x7fd22ab5ba00] decode_slice_header error<br>
    [h264 @ 0x7fd22ab5ba00] reference picture missing during reorder<br>
    [h264 @ 0x7fd22ab5ba00] Missing reference picture, default is 0<br>
    [h264 @ 0x7fd22ab5ba00] reference picture missing during reorder<br>
    [h264 @ 0x7fd22ab5ba00] Missing reference picture, default is 2<br>
    [h264 @ 0x7fd22ab5ba00] left block unavailable for requested intra
    mode at 0 13<br>
    [h264 @ 0x7fd22ab5ba00] error while decoding MB 0 13, bytestream
    (-4)<br>
    [h264 @ 0x7fd22ab5ba00] concealing 159 DC, 159 AC, 159 MV errors in
    P frame<br>
    [h264 @ 0x7fd22ab5ba00] reference picture missing during reorder<br>
    [h264 @ 0x7fd22ab5ba00] Missing reference picture, default is 65530<br>
    [h264 @ 0x7fd22ab5ba00] reference picture missing during reorder<br>
    [h264 @ 0x7fd22ab5ba00] Missing reference picture, default is 65532<br>
    [h264 @ 0x7fd22ab5ba00] Invalid mix of idr and non-idr slices<br>
    Error while decoding frame 0<br>
    <br>
    Obviously, playing the generated .h264 file in ffplay works, and I
    imagine that decoding to h264 was left out for a reason.<br>
    I understand that I need to set up the decoder with the sps and pps
    nals before I can begin feeding it nals for the purposes of
    generating frames, but I only understand this conceptually.  I could
    use some pointers as to where I need to put the proper
    initialization data so that I can begin decoding.  Additionally, the
    doxygen for avcodec_open2 suggests that a dictionary structure can
    be used to... pass in parameters (to the codec I guess?), but is
    also used to enumerate the list of parameters that were not found??
    (what does this mean?)  Where can I find a list of parameters
    appropriate for the h264 codec, as something tells me this is what I
    would use to pass in the sps and pps nals?<br>
    <br>
    I appreciate any pointers or documentation that would help me work
    out what to do, thanks!<br>
    <pre class="moz-signature" cols="72">-- 
Joshua Kordani
LSA Autonomy</pre>
  </body>
</html>