]> git.pld-linux.org Git - packages/gpac.git/blob - 260_all_ffmpeg_bump.patch
- release 12
[packages/gpac.git] / 260_all_ffmpeg_bump.patch
1 Index: gpac/modules/ffmpeg_in/ffmpeg_decode.c
2 ===================================================================
3 --- gpac.orig/modules/ffmpeg_in/ffmpeg_decode.c
4 +++ gpac/modules/ffmpeg_in/ffmpeg_decode.c
5 @@ -111,7 +111,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
6                 bs = gf_bs_new(esd->decoderConfig->decoderSpecificInfo->data, esd->decoderConfig->decoderSpecificInfo->dataLength, GF_BITSTREAM_READ);
7                 codec_id = gf_bs_read_u32(bs);
8                 if (ffd->st==GF_STREAM_AUDIO) {
9 -                       ffd->ctx->codec_type = CODEC_TYPE_AUDIO;
10 +                       ffd->ctx->codec_type = AVMEDIA_TYPE_AUDIO;
11                         ffd->ctx->sample_rate = gf_bs_read_u32(bs);
12                         ffd->ctx->channels = gf_bs_read_u16(bs);
13                         ffd->ctx->frame_size = gf_bs_read_u16(bs);
14 @@ -121,7 +121,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
15                         /*ffmpeg specific*/
16                         ffd->ctx->block_align = gf_bs_read_u16(bs);
17                 } else if (ffd->st==GF_STREAM_VISUAL) {
18 -                       ffd->ctx->codec_type = CODEC_TYPE_VIDEO;
19 +                       ffd->ctx->codec_type = AVMEDIA_TYPE_VIDEO;
20                         ffd->ctx->width = gf_bs_read_u16(bs);
21                         ffd->ctx->height = gf_bs_read_u16(bs);
22                 }
23 @@ -138,7 +138,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
24                 bs = gf_bs_new(esd->decoderConfig->decoderSpecificInfo->data, esd->decoderConfig->decoderSpecificInfo->dataLength, GF_BITSTREAM_READ);
25                 codec_id = gf_bs_read_u32(bs);
26                 if (ffd->st==GF_STREAM_AUDIO) {
27 -                       ffd->ctx->codec_type = CODEC_TYPE_AUDIO;
28 +                       ffd->ctx->codec_type = AVMEDIA_TYPE_AUDIO;
29                         ffd->ctx->sample_rate = gf_bs_read_u32(bs);
30                         ffd->ctx->channels = gf_bs_read_u16(bs);
31                         ffd->ctx->frame_size = gf_bs_read_u16(bs);
32 @@ -151,7 +151,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
33                           ffd->ctx->frame_size = 160;
34                         }
35                 } else if (ffd->st==GF_STREAM_VISUAL) {
36 -                       ffd->ctx->codec_type = CODEC_TYPE_VIDEO;
37 +                       ffd->ctx->codec_type = AVMEDIA_TYPE_VIDEO;
38                         ffd->ctx->width = gf_bs_read_u16(bs);
39                         ffd->ctx->height = gf_bs_read_u16(bs);
40                 }
41 @@ -163,7 +163,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
42         else {
43                 u32 codec_id = 0;
44                 if (ffd->st==GF_STREAM_VISUAL) {
45 -                       ffd->ctx->codec_type = CODEC_TYPE_VIDEO;
46 +                       ffd->ctx->codec_type = AVMEDIA_TYPE_VIDEO;
47                         switch (ffd->oti) {
48                         case 0x20:
49                                 codec_id = CODEC_ID_MPEG4;
50 @@ -190,7 +190,7 @@ static GF_Err FFDEC_AttachStream(GF_Base
51                                 break;
52                         }
53                 } else if (ffd->st==GF_STREAM_AUDIO) {
54 -                       ffd->ctx->codec_type = CODEC_TYPE_AUDIO;
55 +                       ffd->ctx->codec_type = AVMEDIA_TYPE_AUDIO;
56                         switch (ffd->oti) {
57                         case 0x69:
58                         case 0x6B:
59 @@ -412,20 +412,20 @@ static GF_Err FFDEC_ProcessData(GF_Media
60  
61         /*WARNING: this breaks H264 (and maybe others) decoding, disabled for now*/
62  #if 1
63 -       if (!ffd->ctx->hurry_up) {
64 +       if (ffd->ctx->skip_frame=AVDISCARD_DEFAULT) {
65                 switch (mmlevel) {
66                 case GF_CODEC_LEVEL_SEEK:
67                 case GF_CODEC_LEVEL_DROP:
68                         /*skip as much as possible*/
69 -                       ffd->ctx->hurry_up = 5;
70 +                       ffd->ctx->skip_frame = AVDISCARD_ALL;
71                         break;
72                 case GF_CODEC_LEVEL_VERY_LATE:
73                 case GF_CODEC_LEVEL_LATE:
74                         /*skip B-frames*/
75 -                       ffd->ctx->hurry_up = 1;
76 +                       ffd->ctx->skip_frame = AVDISCARD_BIDIR;
77                         break;
78                 default:
79 -                       ffd->ctx->hurry_up = 0;
80 +                       ffd->ctx->skip_frame = AVDISCARD_DEFAULT;
81                         break;
82                 }
83         }
84 @@ -452,7 +452,7 @@ redecode:
85                 if (len<0) { ffd->frame_start = 0; return GF_NON_COMPLIANT_BITSTREAM; }
86                 if (gotpic<0) { ffd->frame_start = 0; return GF_OK; }
87  
88 -               ffd->ctx->hurry_up = 0;
89 +               ffd->ctx->skip_frame = AVDISCARD_DEFAULT;
90  
91                 if (ffd->ctx->frame_size < gotpic) ffd->ctx->frame_size = gotpic;
92  
93 @@ -553,7 +553,7 @@ redecode:
94                                 }
95                         }
96                 }
97 -               ffd->ctx->hurry_up = 0;
98 +               ffd->ctx->skip_frame = AVDISCARD_DEFAULT;
99                 /*recompute outsize in case on-the-fly change*/
100                 if ((w != ffd->ctx->width) || (h != ffd->ctx->height)) {
101                         outsize = ffd->ctx->width * ffd->ctx->height * 3;
102 Index: gpac/modules/ffmpeg_in/ffmpeg_demux.c
103 ===================================================================
104 --- gpac.orig/modules/ffmpeg_in/ffmpeg_demux.c
105 +++ gpac/modules/ffmpeg_in/ffmpeg_demux.c
106 @@ -233,10 +233,10 @@ static Bool FFD_CanHandleURL(GF_InputSer
107      for(i = 0; i < ctx->nb_streams; i++) {
108          AVCodecContext *enc = ctx->streams[i]->codec;
109          switch(enc->codec_type) {
110 -        case CODEC_TYPE_AUDIO:
111 +        case AVMEDIA_TYPE_AUDIO:
112              if (!has_audio) has_audio = 1;
113              break;
114 -        case CODEC_TYPE_VIDEO:
115 +        case AVMEDIA_TYPE_VIDEO:
116              if (!has_video) has_video= 1;
117              break;
118          default:
119 @@ -552,13 +552,13 @@ static GF_Err FFD_ConnectService(GF_Inpu
120      for (i = 0; i < ffd->ctx->nb_streams; i++) {
121          AVCodecContext *enc = ffd->ctx->streams[i]->codec;
122          switch(enc->codec_type) {
123 -        case CODEC_TYPE_AUDIO:
124 +        case AVMEDIA_TYPE_AUDIO:
125              if ((ffd->audio_st<0) && (ffd->service_type!=1)) {
126                                 ffd->audio_st = i;
127                                 ffd->audio_tscale = ffd->ctx->streams[i]->time_base;
128                         }
129              break;
130 -        case CODEC_TYPE_VIDEO:
131 +        case AVMEDIA_TYPE_VIDEO:
132              if ((ffd->video_st<0) && (ffd->service_type!=2)) {
133                                 ffd->video_st = i;
134                                 ffd->video_tscale = ffd->ctx->streams[i]->time_base;
This page took 0.141029 seconds and 3 git commands to generate.