title: Statement has no effect 'AVPacket'
body: <p>I am developing a Decoder using android NDK and FFmpeg native libraries. I have put Native Support for the project using Android Tools and I have the C code in videodecoder.cpp file. In the file the following function gives me this problem</p>
  
  <pre><code>JNIEXPORT jint Java_ssrp_android_ffmpegdecoder_H264Decoder_consumeNalUnitsFromDirectBuffer(
          JNIEnv* env, jobject thiz, jobject nal_units, jint num_bytes,
          jlong pkt_pts) {
      DecoderContext *ctx = get_ctx(env, thiz);
  
      void *buf = NULL;
      if (nal_units == NULL) {
          D("Received null buffer, sending empty packet to decoder");
      } else {
          buf = env-&gt;GetDirectBufferAddress(nal_units);
          if (buf == NULL) {
              D("Error getting direct buffer address");
              return -1;
          }
      }
  
      AVPacket packet = {.data = (uint8_t*) buf, .size = num_bytes, .pts = pkt_pts };
  
      int frameFinished = 0;
      int res = avcodec_decode_video2(ctx-&gt;codec_ctx, ctx-&gt;src_frame,&amp;frameFinished, &amp;packet);
  
      if (frameFinished)
          ctx-&gt;frame_ready = 1;
  
      return res;
  }
  </code></pre>
  
  <p>At the line <code>AVPacket packet = {.data = (uint8_t*) buf, .size = num_bytes, .pts = pkt_pts };</code></p>
  
  <p>It says that `Statement has no effect "AVPAcket" and</p>
  
  <p>At the line <code>int res = avcodec_decode_video2(ctx-&gt;codec_ctx, ctx-&gt;src_frame,&amp;frameFinished, &amp;packet);</code> </p>
  
  <p>It says that <code>Invalid arguments '
  Candidates are:
  int avcodec_decode_video2(AVCodecContext *, AVFrame *, int *, const AVPacket *)'</code></p>