Revision 15bc38e5 libavformat/flvdec.c

View differences:

libavformat/flvdec.c
103 103
            return AVERROR_NOMEM;
104 104

  
105 105
        av_set_pts_info(st, 24, 1, 1000); /* 24 bit pts in ms */
106
        st->codec.frame_rate_base= 0;
106
        st->codec.frame_rate_base= 1;
107
        st->codec.frame_rate= 1000;
107 108
    }
108 109
    break;
109 110
 }
......
123 124
            }
124 125
        }
125 126
    }else{
126
        if(st->codec.frame_rate_base == 0){
127 127
            st->codec.codec_type = CODEC_TYPE_VIDEO;
128
            //guess the frame rate
129
            if(pts){
130
                st->codec.frame_rate_base=1;
131
                st->codec.frame_rate= (1000 + pts/2)/pts;
132
            }
133 128
            switch(flags & 0xF){
134 129
            case 2: st->codec.codec_id = CODEC_ID_FLV1; break;
135 130
            default:
136 131
                st->codec.codec_tag= flags & 0xF;
137 132
            }
138
        }
139 133
    }
140 134

  
141 135
    if (av_new_packet(pkt, size) < 0)

Also available in: Unified diff