|
Lines 140-146
ffmpeg_init (DB_fileinfo_t *_info, DB_playItem_t *it) {
Link Here
|
| 140 |
for (i = 0; i < info->fctx->nb_streams; i++) |
140 |
for (i = 0; i < info->fctx->nb_streams; i++) |
| 141 |
{ |
141 |
{ |
| 142 |
info->ctx = info->fctx->streams[i]->codec; |
142 |
info->ctx = info->fctx->streams[i]->codec; |
| 143 |
if (info->ctx->codec_type == CODEC_TYPE_AUDIO) |
143 |
if (info->ctx->codec_type == AVMEDIA_TYPE_AUDIO) |
| 144 |
{ |
144 |
{ |
| 145 |
info->codec = avcodec_find_decoder (info->ctx->codec_id); |
145 |
info->codec = avcodec_find_decoder (info->ctx->codec_id); |
| 146 |
if (info->codec != NULL) { |
146 |
if (info->codec != NULL) { |
|
Lines 490-496
ffmpeg_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) {
Link Here
|
| 490 |
for (i = 0; i < fctx->nb_streams; i++) |
490 |
for (i = 0; i < fctx->nb_streams; i++) |
| 491 |
{ |
491 |
{ |
| 492 |
ctx = fctx->streams[i]->codec; |
492 |
ctx = fctx->streams[i]->codec; |
| 493 |
if (ctx->codec_type == CODEC_TYPE_AUDIO) |
493 |
if (ctx->codec_type == AVMEDIA_TYPE_AUDIO) |
| 494 |
{ |
494 |
{ |
| 495 |
codec = avcodec_find_decoder(ctx->codec_id); |
495 |
codec = avcodec_find_decoder(ctx->codec_id); |
| 496 |
if (codec != NULL && !strcasecmp (codec->name, "alac")) { // only open alac streams |
496 |
if (codec != NULL && !strcasecmp (codec->name, "alac")) { // only open alac streams |
|
Lines 704-710
ffmpeg_start (void) {
Link Here
|
| 704 |
ffmpeg_init_exts (); |
704 |
ffmpeg_init_exts (); |
| 705 |
avcodec_init (); |
705 |
avcodec_init (); |
| 706 |
av_register_all (); |
706 |
av_register_all (); |
|
|
707 |
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 53, 0, 0 ) |
| 708 |
av_register_protocol2(&vfswrapper, sizeof(vfswrapper)); |
| 709 |
#else |
| 707 |
av_register_protocol (&vfswrapper); |
710 |
av_register_protocol (&vfswrapper); |
|
|
711 |
#endif |
| 708 |
return 0; |
712 |
return 0; |
| 709 |
} |
713 |
} |
| 710 |
|
714 |
|
|
Lines 745-751
ffmpeg_read_metadata (DB_playItem_t *it) {
Link Here
|
| 745 |
for (i = 0; i < fctx->nb_streams; i++) |
749 |
for (i = 0; i < fctx->nb_streams; i++) |
| 746 |
{ |
750 |
{ |
| 747 |
ctx = fctx->streams[i]->codec; |
751 |
ctx = fctx->streams[i]->codec; |
| 748 |
if (ctx->codec_type == CODEC_TYPE_AUDIO) |
752 |
if (ctx->codec_type == AVMEDIA_TYPE_AUDIO) |
| 749 |
{ |
753 |
{ |
| 750 |
codec = avcodec_find_decoder(ctx->codec_id); |
754 |
codec = avcodec_find_decoder(ctx->codec_id); |
| 751 |
if (codec != NULL) |
755 |
if (codec != NULL) |
| 752 |
- |
|
|