avpicture_fill(&pict, ptr,
avpicture_fill((AVPicture *)&frame, ptr,
static int video_thread(void *arg){    VideoState *is = arg;    AVPacket pkt1, *pkt = &pkt1;    unsigned char *ptr;    int len, len1, got_picture, i;    AVFrame frame;    AVPicture pict;    int64_t ipts;    double pts;    for(;;) {        while (is->paused && !is->videoq.abort_request) {            SDL_Delay(10);        }        if (packet_queue_get(&is->videoq, pkt, 1) < 0)            break;        ipts = pkt->pts;        ptr = pkt->data;        if (is->video_st->codec.codec_id == CODEC_ID_RAWVIDEO) {            avpicture_fill(&pict, ptr,                            is->video_st->codec.pix_fmt,                           is->video_st->codec.width,                           is->video_st->codec.height);            pts = 0;            if (ipts != AV_NOPTS_VALUE)                pts = (double)ipts * is->ic->pts_num / is->ic->pts_den;            if (output_picture(is, &pict, pts) < 0)                goto the_end;        } else {            len = pkt->size;            while (len > 0) {                len1 = avcodec_decode_video(&is->video_st->codec,                                             &frame, &got_picture, ptr, len);                if (len1 < 0)                    break;                if (got_picture) {                    for(i=0;i<4;i++) {                        pict.data[i] = frame.data[i];                        pict.linesize[i] = frame.linesize[i];                    }                    pts = 0;                    if (ipts != AV_NOPTS_VALUE)                        pts = (double)ipts * is->ic->pts_num / is->ic->pts_den;                    ipts = AV_NOPTS_VALUE;                    if (output_picture(is, &pict, pts) < 0)                        goto the_end;                }                ptr += len1;                len -= len1;            }        }        av_free_packet(pkt);    } the_end:    return 0;}