Merge commit 'fa60904ebd58da33abf10b05e9933d24619cf096' into release/0.10
* commit 'fa60904ebd58da33abf10b05e9933d24619cf096': bytestream: add bytestream2_copy_buffer() functions bytestream: add functions for accessing size of buffer movenc: allow override of "writing application" tag Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -198,6 +198,16 @@ static av_always_inline int bytestream2_tell_p(PutByteContext *p)
|
|||||||
return (int)(p->buffer - p->buffer_start);
|
return (int)(p->buffer - p->buffer_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static av_always_inline int bytestream2_size(GetByteContext *g)
|
||||||
|
{
|
||||||
|
return (int)(g->buffer_end - g->buffer_start);
|
||||||
|
}
|
||||||
|
|
||||||
|
static av_always_inline int bytestream2_size_p(PutByteContext *p)
|
||||||
|
{
|
||||||
|
return (int)(p->buffer_end - p->buffer_start);
|
||||||
|
}
|
||||||
|
|
||||||
static av_always_inline int bytestream2_seek(GetByteContext *g,
|
static av_always_inline int bytestream2_seek(GetByteContext *g,
|
||||||
int offset,
|
int offset,
|
||||||
int whence)
|
int whence)
|
||||||
@@ -323,6 +333,32 @@ static av_always_inline unsigned int bytestream2_get_eof(PutByteContext *p)
|
|||||||
return p->eof;
|
return p->eof;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static av_always_inline unsigned int bytestream2_copy_bufferu(PutByteContext *p,
|
||||||
|
GetByteContext *g,
|
||||||
|
unsigned int size)
|
||||||
|
{
|
||||||
|
memcpy(p->buffer, g->buffer, size);
|
||||||
|
p->buffer += size;
|
||||||
|
g->buffer += size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
static av_always_inline unsigned int bytestream2_copy_buffer(PutByteContext *p,
|
||||||
|
GetByteContext *g,
|
||||||
|
unsigned int size)
|
||||||
|
{
|
||||||
|
int size2;
|
||||||
|
|
||||||
|
if (p->eof)
|
||||||
|
return 0;
|
||||||
|
size = FFMIN(g->buffer_end - g->buffer, size);
|
||||||
|
size2 = FFMIN(p->buffer_end - p->buffer, size);
|
||||||
|
if (size2 != size)
|
||||||
|
p->eof = 1;
|
||||||
|
|
||||||
|
return bytestream2_copy_bufferu(p, g, size2);
|
||||||
|
}
|
||||||
|
|
||||||
static av_always_inline unsigned int bytestream_get_buffer(const uint8_t **b,
|
static av_always_inline unsigned int bytestream_get_buffer(const uint8_t **b,
|
||||||
uint8_t *dst,
|
uint8_t *dst,
|
||||||
unsigned int size)
|
unsigned int size)
|
||||||
|
@@ -1696,6 +1696,7 @@ static int mov_write_ilst_tag(AVIOContext *pb, MOVMuxContext *mov,
|
|||||||
mov_write_string_metadata(s, pb, "\251wrt", "composer" , 1);
|
mov_write_string_metadata(s, pb, "\251wrt", "composer" , 1);
|
||||||
mov_write_string_metadata(s, pb, "\251alb", "album" , 1);
|
mov_write_string_metadata(s, pb, "\251alb", "album" , 1);
|
||||||
mov_write_string_metadata(s, pb, "\251day", "date" , 1);
|
mov_write_string_metadata(s, pb, "\251day", "date" , 1);
|
||||||
|
if (!mov_write_string_metadata(s, pb, "\251too", "encoding_tool", 1))
|
||||||
mov_write_string_tag(pb, "\251too", LIBAVFORMAT_IDENT, 0, 1);
|
mov_write_string_tag(pb, "\251too", LIBAVFORMAT_IDENT, 0, 1);
|
||||||
mov_write_string_metadata(s, pb, "\251cmt", "comment" , 1);
|
mov_write_string_metadata(s, pb, "\251cmt", "comment" , 1);
|
||||||
mov_write_string_metadata(s, pb, "\251gen", "genre" , 1);
|
mov_write_string_metadata(s, pb, "\251gen", "genre" , 1);
|
||||||
|
Reference in New Issue
Block a user