Skip to content

Commit 2f7f420

Browse files
committed
add support c99
1 parent 3f0bd92 commit 2f7f420

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

lib/libvideo/queue.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ type queue_out(pQueue Q){ //入队列
108108
}
109109

110110
void queue_trav(pQueue Q){ //遍历队列显示结果
111-
for(int i = Q->fron; i != Q->rear; i=(i+1)%Q->size){
111+
int i;
112+
for(i = Q->fron; i != Q->rear; i=(i+1)%Q->size){
112113
printf(" %d ",Q->data[i]);
113114
}
114115
}

lib/libvideo/video.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,8 @@ int video_init_media(video_t* video) {
949949
// Find the first video stream
950950
video->videoStream = -1;
951951
video->audioStream = -1;
952-
for (int i = 0; i < video->pFormatCtx->nb_streams; i++) {
952+
int i;
953+
for (i = 0; i < video->pFormatCtx->nb_streams; i++) {
953954
if (video->pFormatCtx->streams[i]->codec->codec_type ==
954955
AVMEDIA_TYPE_VIDEO &&
955956
video->videoStream < 0) {
@@ -1116,8 +1117,8 @@ video_t* video_new(char* filename, float width, float height) {
11161117

11171118
// gl init
11181119
video_gl_init(video);
1119-
1120-
for (int i = 0; i < MAX_STREAM; i++) {
1120+
int i;
1121+
for (i = 0; i < MAX_STREAM; i++) {
11211122
queue_init(&video->packets[i]);
11221123
// printf("queue %d %p
11231124
// %d\n",i,&video->packets[i],queue_get_length(&video->packets[i]) );

0 commit comments

Comments
 (0)