Ticket #36830: patch-src-profiles.c.diff

File patch-src-profiles.c.diff, 1.2 KB (added by todmorrison (Tod Morrison), 11 years ago)

libdlna 0.2.3 + ffmpeg 1.0 patch

  • src/profiles.c

    old new  
    204204
    205205  for (i = 0; i < ctx->nb_streams; i++)
    206206  {
     207#if LIBAVFORMAT_BUILD < 4621
    207208    if (audio_stream == -1 &&
    208209        ctx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
     210#else
     211    if (audio_stream == -1 &&
     212        ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
     213#endif
    209214    {
    210215      audio_stream = i;
    211216      continue;
    212217    }
     218#if LIBAVFORMAT_BUILD < 4621
    213219    else if (video_stream == -1 &&
    214220             ctx->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO)
     221#else
     222    else if (video_stream == -1 &&
     223             ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
     224#endif
    215225    {
    216226      video_stream = i;
    217227      continue;
     
    280290  if (!dlna->inited)
    281291    dlna = dlna_init ();
    282292 
    283   if (av_open_input_file (&ctx, filename, NULL, 0, NULL) != 0)
     293  if (avformat_open_input (&ctx, filename, NULL, NULL) != 0)
    284294  {
    285295    if (dlna->verbosity)
    286296      fprintf (stderr, "can't open file: %s\n", filename);
     
    334344    p = p->next;
    335345  }
    336346
    337   av_close_input_file (ctx);
     347  avformat_close_input (ctx);
    338348  free (codecs);
    339349  return profile;
    340350}