]>
Commit | Line | Data |
---|---|---|
4836da25 JB |
1 | --- gmerlin-avdecoder-1.1.0/lib/demux_ffmpeg.c.orig 2011-01-07 17:59:57.000000000 +0100 |
2 | +++ gmerlin-avdecoder-1.1.0/lib/demux_ffmpeg.c 2011-07-27 18:38:47.552019582 +0200 | |
3 | @@ -583,7 +583,7 @@ | |
4 | #if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52, 29, 0) | |
5 | register_protocol(&bgav_protocol); | |
6 | #else | |
7 | - av_register_protocol(&bgav_protocol); | |
8 | + av_register_protocol2(&bgav_protocol, sizeof(bgav_protocol)); | |
9 | #endif | |
10 | ||
11 | #if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52, 26, 0) | |
12 | @@ -629,13 +629,13 @@ static int open_ffmpeg(bgav_demuxer_cont | |
13 | { | |
14 | switch(avfc->streams[i]->codec->codec_type) | |
15 | { | |
16 | - case CODEC_TYPE_AUDIO: | |
17 | + case AVMEDIA_TYPE_AUDIO: | |
18 | init_audio_stream(ctx, avfc->streams[i], i); | |
19 | break; | |
20 | - case CODEC_TYPE_VIDEO: | |
21 | + case AVMEDIA_TYPE_VIDEO: | |
22 | init_video_stream(ctx, avfc->streams[i], i); | |
23 | break; | |
24 | - case CODEC_TYPE_SUBTITLE: | |
25 | + case AVMEDIA_TYPE_SUBTITLE: | |
26 | break; | |
27 | default: | |
28 | break; | |
29 | @@ -654,16 +654,19 @@ static int open_ffmpeg(bgav_demuxer_cont | |
30 | priv->avfc->iformat->long_name); | |
31 | ||
32 | /* Metadata */ | |
33 | - if(avfc->title[0]) | |
34 | - ctx->tt->cur->metadata.title = bgav_strdup(avfc->title); | |
35 | - if(avfc->author[0]) | |
36 | - ctx->tt->cur->metadata.author = bgav_strdup(avfc->author); | |
37 | - if(avfc->copyright[0]) | |
38 | - ctx->tt->cur->metadata.copyright = bgav_strdup(avfc->copyright); | |
39 | - if(avfc->album[0]) | |
40 | - ctx->tt->cur->metadata.album = bgav_strdup(avfc->album); | |
41 | - if(avfc->genre[0]) | |
42 | - ctx->tt->cur->metadata.genre = bgav_strdup(avfc->genre); | |
43 | + { | |
44 | + AVDictionaryEntry *ade; | |
45 | + if((ade = av_dict_get(avfc->metadata, "TITLE", NULL, 0)) != NULL) | |
46 | + ctx->tt->cur->metadata.title = bgav_strdup(ade->value); | |
47 | + if((ade = av_dict_get(avfc->metadata, "ARTIST", NULL, 0)) != NULL) | |
48 | + ctx->tt->cur->metadata.author = bgav_strdup(ade->value); | |
49 | + if((ade = av_dict_get(avfc->metadata, "COPYRIGHT", NULL, 0)) != NULL) | |
50 | + ctx->tt->cur->metadata.copyright = bgav_strdup(ade->value); | |
51 | + if((ade = av_dict_get(avfc->metadata, "ALBUM", NULL, 0)) != NULL) | |
52 | + ctx->tt->cur->metadata.album = bgav_strdup(ade->value); | |
53 | + if((ade = av_dict_get(avfc->metadata, "GENRE", NULL, 0)) != NULL) | |
54 | + ctx->tt->cur->metadata.genre = bgav_strdup(ade->value); | |
55 | + } | |
56 | ||
57 | return 1; | |
58 | } | |
59 | @@ -739,7 +742,7 @@ static int next_packet_ffmpeg(bgav_demux | |
60 | s->data.video.palette_changed = 1; | |
61 | } | |
62 | ||
63 | - if(pkt.flags&PKT_FLAG_KEY) | |
64 | + if(pkt.flags&AV_PKT_FLAG_KEY) | |
65 | PACKET_SET_KEYFRAME(p); | |
66 | bgav_stream_done_packet_write(s, p); | |
67 | ||
68 | --- gmerlin-avdecoder-1.1.0/lib/video_ffmpeg.c.orig 2011-01-07 17:59:57.000000000 +0100 | |
69 | +++ gmerlin-avdecoder-1.1.0/lib/video_ffmpeg.c 2011-07-27 18:39:15.985353869 +0200 | |
70 | @@ -836,7 +836,7 @@ static int init_ffmpeg(bgav_stream_t * s | |
71 | if(s->action == BGAV_STREAM_PARSE) | |
72 | return 1; | |
73 | ||
74 | - priv->ctx->codec_type = CODEC_TYPE_VIDEO; | |
75 | + priv->ctx->codec_type = AVMEDIA_TYPE_VIDEO; | |
76 | ||
77 | priv->ctx->bit_rate = 0; | |
78 | ||
79 | --- gmerlin-avdecoder-1.1.0/lib/Makefile.am.orig 2011-01-06 05:55:55.000000000 +0100 | |
80 | +++ gmerlin-avdecoder-1.1.0/lib/Makefile.am 2011-07-27 18:44:12.105363783 +0200 | |
81 | @@ -130,7 +130,7 @@ endif | |
82 | ||
83 | if HAVE_LIBAVFORMAT | |
84 | avformat_cflags = @AVFORMAT_CFLAGS@ | |
85 | -avformat_libs = @AVFORMAT_LIBS@ | |
86 | +avformat_libs = @AVFORMAT_LIBS@ -lavutil | |
87 | avformat_sources = demux_ffmpeg.c | |
88 | else | |
89 | avformat_cflags = |