memcpy(pkt->data, c->buf, c->size); return ret;
return c->size;
static int dv_read_packet(AVFormatContext *s, AVPacket *pkt){    int ret, dsf;    DVDemuxContext *c = s->priv_data;        if (!c->is_audio) {        ret = get_buffer(&s->pb, c->buf, 4);        if (ret <= 0)             return -EIO;        dsf = c->buf[3] & 0x80;        if (!dsf)            c->size = NTSC_FRAME_SIZE;        else            c->size = PAL_FRAME_SIZE;		ret = get_buffer(&s->pb, c->buf + 4, c->size - 4);	if (ret <= 0)	    return -EIO;    }        if (av_new_packet(pkt, c->size) < 0)        return -EIO;    pkt->stream_index = c->is_audio;    c->is_audio = !c->is_audio;    memcpy(pkt->data, c->buf, c->size);    return ret;}