source: packages/sound/mocp/patches/001-moc-ffmpeg-update.patch @ 28210

Last change on this file since 28210 was 28210, checked in by loswillios, 5 years ago

[packages] mocp: build with newer ffmpeg (#10082)

File size: 1.3 KB
  • decoder_plugins/ffmpeg/ffmpeg.c

    a b static void ffmpeg_info (const char *fil 
    8181        } 
    8282 
    8383        if (tags_sel & TAGS_COMMENTS) { 
    84                 if (ic->track != 0) 
    85                         info->track = ic->track; 
    86                 if (ic->title[0] != 0) 
    87                         info->title = xstrdup (ic->title); 
    88                 if (ic->author[0] != 0) 
    89                         info->artist = xstrdup (ic->author); 
    90                 if (ic->album[0] != 0) 
    91                         info->album = xstrdup (ic->album); 
     84                if (av_metadata_get(ic->metadata, "track", NULL, 0) != NULL) 
     85                                info->track = atoi(av_metadata_get(ic->metadata, "track", NULL, 0)->value); 
     86                if (av_metadata_get(ic->metadata, "title", NULL, 0) != NULL) 
     87                                info->title = xstrdup (av_metadata_get(ic->metadata, "title", NULL, 0)->value); 
     88                if (av_metadata_get(ic->metadata, "author", NULL, 0) != NULL) 
     89                                info->artist = xstrdup (av_metadata_get(ic->metadata, "author", NULL, 0)->value); 
     90                if (av_metadata_get(ic->metadata, "album", NULL, 0) != NULL) 
     91                                info->album = xstrdup (av_metadata_get(ic->metadata, "album", NULL, 0)->value); 
    9292        } 
    9393 
    9494        if (tags_sel & TAGS_TIME) 
    static void *ffmpeg_open (const char *fi 
    127127        av_read_play (data->ic); 
    128128        for (i = 0; i < data->ic->nb_streams; i++) { 
    129129                data->enc = data->ic->streams[i]->codec; 
    130                 if (data->enc->codec_type == CODEC_TYPE_AUDIO) { 
     130                if (data->enc->codec_type == AVMEDIA_TYPE_AUDIO) { 
    131131                        audio_index = i; 
    132132                        break; 
    133133                } 
Note: See TracBrowser for help on using the repository browser.