I use FFmpeg library for android ndk. There is no problem when I run .mp4 format video. Actually, I play the video file that has the .264 suffix. However, when I run .264 format video, the code returns a negative number like that -232132.

this is code:

```
extern "C"
JNIEXPORT jint JNICALL
Java_com_lscodex_just_videoplayertesting2_H264Decode_getDuration(JNIEnv *env, jobject instance) {

  AVFormatContext *formatContext = gvs->pFormatCtx;

    if (NULL != formatContext) {

         int durations = static_cast<jint>(formatContext->duration / AV_TIME_BASE);
         logd("VIDEO DURATION ---> %d", durations);
         return durations;
     } else {
         return -1;
     }
}

```

the output is VIDEO DURATION ---> -2077252342 

Do you have any suggestions for me?