Revision 4efd5cf3
libavformat/avienc.c | ||
---|---|---|
109 | 109 |
len++; |
110 | 110 |
put_tag(pb, tag); |
111 | 111 |
put_le32(pb, len); |
112 |
put_strz(pb, str);
|
|
112 |
avio_put_str(pb, str);
|
|
113 | 113 |
if (len & 1) |
114 | 114 |
put_byte(pb, 0); |
115 | 115 |
} |
libavformat/avio.h | ||
---|---|---|
367 | 367 |
void put_be16(ByteIOContext *s, unsigned int val); |
368 | 368 |
void put_tag(ByteIOContext *s, const char *tag); |
369 | 369 |
|
370 |
void put_strz(ByteIOContext *s, const char *buf); |
|
370 |
#if FF_API_OLD_AVIO |
|
371 |
attribute_deprecated void put_strz(ByteIOContext *s, const char *buf); |
|
372 |
#endif |
|
373 |
|
|
374 |
/** |
|
375 |
* Write a NULL-terminated string. |
|
376 |
* @return number of bytes written. |
|
377 |
*/ |
|
378 |
int avio_put_str(ByteIOContext *s, const char *str); |
|
371 | 379 |
|
372 | 380 |
/** |
373 | 381 |
* fseek() equivalent for ByteIOContext. |
libavformat/aviobuf.c | ||
---|---|---|
265 | 265 |
put_byte(s, val); |
266 | 266 |
} |
267 | 267 |
|
268 |
#if FF_API_OLD_AVIO |
|
268 | 269 |
void put_strz(ByteIOContext *s, const char *str) |
269 | 270 |
{ |
270 |
if (str) |
|
271 |
put_buffer(s, (const unsigned char *) str, strlen(str) + 1); |
|
272 |
else |
|
271 |
avio_put_str(s, str); |
|
272 |
} |
|
273 |
#endif |
|
274 |
|
|
275 |
int avio_put_str(ByteIOContext *s, const char *str) |
|
276 |
{ |
|
277 |
int len = 1; |
|
278 |
if (str) { |
|
279 |
len += strlen(str); |
|
280 |
put_buffer(s, (const unsigned char *) str, len); |
|
281 |
} else |
|
273 | 282 |
put_byte(s, 0); |
283 |
return len; |
|
274 | 284 |
} |
275 | 285 |
|
276 | 286 |
int ff_get_v_length(uint64_t val){ |
libavformat/ffmenc.c | ||
---|---|---|
132 | 132 |
put_be16(pb, (int) (codec->qcompress * 10000.0)); |
133 | 133 |
put_be16(pb, (int) (codec->qblur * 10000.0)); |
134 | 134 |
put_be32(pb, codec->bit_rate_tolerance); |
135 |
put_strz(pb, codec->rc_eq ? codec->rc_eq : "tex^qComp");
|
|
135 |
avio_put_str(pb, codec->rc_eq ? codec->rc_eq : "tex^qComp");
|
|
136 | 136 |
put_be32(pb, codec->rc_max_rate); |
137 | 137 |
put_be32(pb, codec->rc_min_rate); |
138 | 138 |
put_be32(pb, codec->rc_buffer_size); |
libavformat/version.h | ||
---|---|---|
86 | 86 |
#ifndef FF_API_SYMVER |
87 | 87 |
#define FF_API_SYMVER (LIBAVFORMAT_VERSION_MAJOR < 53) |
88 | 88 |
#endif |
89 |
#ifndef FF_API_OLD_AVIO |
|
90 |
#define FF_API_OLD_AVIO (LIBAVFORMAT_VERSION_MAJOR < 53) |
|
91 |
#endif |
|
89 | 92 |
|
90 | 93 |
#endif //AVFORMAT_VERSION_H |
Also available in: Unified diff