Revision 6bfc2683 libavformat/utils.c

View differences:

libavformat/utils.c
339 339
    return ret;
340 340
}
341 341

  
342
int av_append_packet(ByteIOContext *s, AVPacket *pkt, int size)
343
{
344
    int ret;
345
    int old_size;
346
    if (!pkt->size)
347
        return av_get_packet(s, pkt, size);
348
    old_size = pkt->size;
349
    ret = av_grow_packet(pkt, size);
350
    if (ret < 0)
351
        return ret;
352
    ret = get_buffer(s, pkt->data + old_size, size);
353
    av_shrink_packet(pkt, old_size + FFMAX(ret, 0));
354
    return ret;
355
}
356

  
342 357

  
343 358
int av_filename_number_test(const char *filename)
344 359
{

Also available in: Unified diff