mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-12 18:31:37 +00:00
add a ff_ prefix to newly exported functions from avc.c
Originally committed as revision 11511 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
e609806ec6
commit
9ab3f71b60
@ -58,7 +58,7 @@ static uint8_t *avc_find_startcode( uint8_t *p, uint8_t *end )
|
|||||||
return end + 3;
|
return end + 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
int avc_parse_nal_units(uint8_t *buf_in, uint8_t **buf, int *size)
|
int ff_avc_parse_nal_units(uint8_t *buf_in, uint8_t **buf, int *size)
|
||||||
{
|
{
|
||||||
ByteIOContext *pb;
|
ByteIOContext *pb;
|
||||||
uint8_t *p = buf_in;
|
uint8_t *p = buf_in;
|
||||||
@ -81,7 +81,7 @@ int avc_parse_nal_units(uint8_t *buf_in, uint8_t **buf, int *size)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int isom_write_avcc(ByteIOContext *pb, uint8_t *data, int len)
|
int ff_isom_write_avcc(ByteIOContext *pb, uint8_t *data, int len)
|
||||||
{
|
{
|
||||||
if (len > 6) {
|
if (len > 6) {
|
||||||
/* check for h264 start code */
|
/* check for h264 start code */
|
||||||
@ -90,7 +90,7 @@ int isom_write_avcc(ByteIOContext *pb, uint8_t *data, int len)
|
|||||||
uint32_t sps_size=0, pps_size=0;
|
uint32_t sps_size=0, pps_size=0;
|
||||||
uint8_t *sps=0, *pps=0;
|
uint8_t *sps=0, *pps=0;
|
||||||
|
|
||||||
int ret = avc_parse_nal_units(data, &buf, &len);
|
int ret = ff_avc_parse_nal_units(data, &buf, &len);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
data = buf;
|
data = buf;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "avio.h"
|
#include "avio.h"
|
||||||
|
|
||||||
int avc_parse_nal_units(uint8_t *buf_in, uint8_t **buf, int *size);
|
int ff_avc_parse_nal_units(uint8_t *buf_in, uint8_t **buf, int *size);
|
||||||
int isom_write_avcc(ByteIOContext *pb, uint8_t *data, int len);
|
int ff_isom_write_avcc(ByteIOContext *pb, uint8_t *data, int len);
|
||||||
|
|
||||||
#endif /* AVC_H */
|
#endif /* AVC_H */
|
||||||
|
@ -481,7 +481,7 @@ static int mkv_write_codecprivate(AVFormatContext *s, ByteIOContext *pb, AVCodec
|
|||||||
else if (codec->codec_id == CODEC_ID_FLAC)
|
else if (codec->codec_id == CODEC_ID_FLAC)
|
||||||
ret = put_flac_codecpriv(s, dyn_cp, codec);
|
ret = put_flac_codecpriv(s, dyn_cp, codec);
|
||||||
else if (codec->codec_id == CODEC_ID_H264)
|
else if (codec->codec_id == CODEC_ID_H264)
|
||||||
ret = isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size);
|
ret = ff_isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size);
|
||||||
else if (codec->extradata_size)
|
else if (codec->extradata_size)
|
||||||
put_buffer(dyn_cp, codec->extradata, codec->extradata_size);
|
put_buffer(dyn_cp, codec->extradata, codec->extradata_size);
|
||||||
} else if (codec->codec_type == CODEC_TYPE_VIDEO) {
|
} else if (codec->codec_type == CODEC_TYPE_VIDEO) {
|
||||||
@ -749,7 +749,7 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
codec->extradata_size > 0 && AV_RB32(codec->extradata) == 0x00000001) {
|
codec->extradata_size > 0 && AV_RB32(codec->extradata) == 0x00000001) {
|
||||||
/* from x264 or from bytestream h264 */
|
/* from x264 or from bytestream h264 */
|
||||||
/* nal reformating needed */
|
/* nal reformating needed */
|
||||||
int ret = avc_parse_nal_units(pkt->data, &pkt->data, &pkt->size);
|
int ret = ff_avc_parse_nal_units(pkt->data, &pkt->data, &pkt->size);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
assert(pkt->size);
|
assert(pkt->size);
|
||||||
|
@ -422,7 +422,7 @@ static int mov_write_avcc_tag(ByteIOContext *pb, MOVTrack *track)
|
|||||||
|
|
||||||
put_be32(pb, 0);
|
put_be32(pb, 0);
|
||||||
put_tag(pb, "avcC");
|
put_tag(pb, "avcC");
|
||||||
isom_write_avcc(pb, track->vosData, track->vosLen);
|
ff_isom_write_avcc(pb, track->vosData, track->vosLen);
|
||||||
return updateSize(pb, pos);
|
return updateSize(pb, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1532,7 +1532,7 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
if (enc->codec_id == CODEC_ID_H264 && trk->vosLen > 0 && *(uint8_t *)trk->vosData != 1) {
|
if (enc->codec_id == CODEC_ID_H264 && trk->vosLen > 0 && *(uint8_t *)trk->vosData != 1) {
|
||||||
/* from x264 or from bytestream h264 */
|
/* from x264 or from bytestream h264 */
|
||||||
/* nal reformating needed */
|
/* nal reformating needed */
|
||||||
int ret = avc_parse_nal_units(pkt->data, &pkt->data, &pkt->size);
|
int ret = ff_avc_parse_nal_units(pkt->data, &pkt->data, &pkt->size);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
assert(pkt->size);
|
assert(pkt->size);
|
||||||
|
Loading…
Reference in New Issue
Block a user