Revision fb2e95c9 libavformat/nuv.c

View differences:

libavformat/nuv.c
197 197
    int ret, size;
198 198
    while (!url_feof(pb)) {
199 199
        int copyhdrsize = ctx->rtjpg_video ? HDRSIZE : 0;
200
        uint64_t pos = url_ftell(pb);
200 201
        ret = get_buffer(pb, hdr, HDRSIZE);
201 202
        if (ret <= 0)
202 203
            return ret ? ret : -1;
......
217 218
                ret = av_new_packet(pkt, copyhdrsize + size);
218 219
                if (ret < 0)
219 220
                    return ret;
220
                pkt->pos = url_ftell(pb) - copyhdrsize;
221
                pkt->pos = pos;
221 222
                pkt->pts = AV_RL32(&hdr[4]);
222 223
                pkt->stream_index = ctx->v_id;
223 224
                memcpy(pkt->data, hdr, copyhdrsize);
......
230 231
                    break;
231 232
                }
232 233
                ret = av_get_packet(pb, pkt, size);
234
                pkt->pos = pos;
233 235
                pkt->pts = AV_RL32(&hdr[4]);
234 236
                pkt->stream_index = ctx->a_id;
235 237
                return ret;

Also available in: Unified diff