libavdevice/audio.c:279: error: Uninitialized Value
  The value read from ret was never initialized.

libavdevice/audio.c:279:5: 
277.     /* compute pts of the start of the packet */
278.     cur_time = av_gettime();
279.     bdelay = ret;
         ^
280.     if (ioctl(s->fd, SNDCTL_DSP_GETISPACE, &abufi) == 0) {
281.         bdelay += abufi.bytes;

static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)
{
    AudioData *s = s1->priv_data;
    int ret, bdelay;
    int64_t cur_time;
    struct audio_buf_info abufi;
    if (av_new_packet(pkt, s->frame_size) < 0)
        return AVERROR(EIO);
    for(;;) {
        struct timeval tv;
        fd_set fds;
        tv.tv_sec = 0;
        tv.tv_usec = 30 * 1000;
        FD_ZERO(&fds);
        FD_SET(s->fd, &fds);
        (void) select(s->fd + 1, &fds, 0, 0, &tv);
        ret = read(s->fd, pkt->data, pkt->size);
        if (ret > 0)
            break;
        if (ret == -1 && (errno == EAGAIN || errno == EINTR)) {
            av_free_packet(pkt);
            pkt->size = 0;
            pkt->pts = av_gettime();
            return 0;
        }
        if (!(ret == 0 || (ret == -1 && (errno == EAGAIN || errno == EINTR)))) {
            av_free_packet(pkt);
            return AVERROR(EIO);
        }
    }
    pkt->size = ret;
    cur_time = av_gettime();
    bdelay = ret;
    if (ioctl(s->fd, SNDCTL_DSP_GETISPACE, &abufi) == 0) {
        bdelay += abufi.bytes;
    }
    cur_time -= (bdelay * 1000000LL) / (s->sample_rate * s->channels);
    pkt->pts = cur_time;
    if (s->flip_left && s->channels == 2) {
        int i;
        short *p = (short *) pkt->data;
        for (i = 0; i < ret; i += 4) {
            *p = ~*p;
            p += 2;
        }
    }
    return 0;
}
['static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)\n{\n    AudioData *s = s1->priv_data;\n    int ret, bdelay;\n    int64_t cur_time;\n    struct audio_buf_info abufi;\n    if (av_new_packet(pkt, s->frame_size) < 0)\n        return AVERROR(EIO);\n    for(;;) {\n        struct timeval tv;\n        fd_set fds;\n        tv.tv_sec = 0;\n        tv.tv_usec = 30 * 1000;\n        FD_ZERO(&fds);\n        FD_SET(s->fd, &fds);\n        (void) select(s->fd + 1, &fds, 0, 0, &tv);\n        ret = read(s->fd, pkt->data, pkt->size);\n        if (ret > 0)\n            break;\n        if (ret == -1 && (errno == EAGAIN || errno == EINTR)) {\n            av_free_packet(pkt);\n            pkt->size = 0;\n            pkt->pts = av_gettime();\n            return 0;\n        }\n        if (!(ret == 0 || (ret == -1 && (errno == EAGAIN || errno == EINTR)))) {\n            av_free_packet(pkt);\n            return AVERROR(EIO);\n        }\n    }\n    pkt->size = ret;\n    cur_time = av_gettime();\n    bdelay = ret;\n    if (ioctl(s->fd, SNDCTL_DSP_GETISPACE, &abufi) == 0) {\n        bdelay += abufi.bytes;\n    }\n    cur_time -= (bdelay * 1000000LL) / (s->sample_rate * s->channels);\n    pkt->pts = cur_time;\n    if (s->flip_left && s->channels == 2) {\n        int i;\n        short *p = (short *) pkt->data;\n        for (i = 0; i < ret; i += 4) {\n            *p = ~*p;\n            p += 2;\n        }\n    }\n    return 0;\n}']