[Ffmpeg-devel] Codec id problem

İsmail Dönmez ismail
Tue Jun 13 15:26:16 CEST 2006

Hi all,

I am trying to learn libavcodec api to code a simple encoder ( any tips is 
appreciated! ), and I came across a weird problem. I got codec id 86018 for 
an AAC audio stream. Here is the output :

cartman at southpark ffmpeg $ ./bug ~/moglen_redhat_summit.mov
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb7f1aec8]negative ctts, ignoring
Codec id: 86018

Here is the test program:
#include <stdio.h>

#include <avformat.h>
#include <avcodec.h>

int main(int argc, char** argv)
  // Register all codecs

  AVFormatContext* formatContext = NULL;
  AVCodecContext* codecContext = NULL;

  const char* filename = argv[1];

  // Open the file
  av_open_input_file(&formatContext, filename, NULL, 0, NULL);

  // Find stream information

  codecContext = formatContext->streams[0]->codec;
  printf("Codec id: %d\n",codecContext->codec_id);

  // Close the video file

  return 0;

The test sample is http://www.redhat.com/v/mov/060606_moglen.mov . Am I doing 
something wrong here, or is it a libavcodec problem. Any help is appreciated.



More information about the ffmpeg-devel mailing list