Commit cdc531fb authored by benoit's avatar benoit

Cosmetics: alignment and long line break.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23559 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 574bef48
...@@ -29,8 +29,8 @@ typedef struct H264BSFContext { ...@@ -29,8 +29,8 @@ typedef struct H264BSFContext {
} H264BSFContext; } H264BSFContext;
static int alloc_and_copy(uint8_t **poutbuf, int *poutbuf_size, static int alloc_and_copy(uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *sps_pps, uint32_t sps_pps_size, const uint8_t *sps_pps, uint32_t sps_pps_size,
const uint8_t *in, uint32_t in_size) { const uint8_t *in, uint32_t in_size) {
uint32_t offset = *poutbuf_size; uint32_t offset = *poutbuf_size;
uint8_t nal_header_size = offset ? 3 : 4; uint8_t nal_header_size = offset ? 3 : 4;
void *tmp; void *tmp;
...@@ -95,7 +95,8 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, ...@@ -95,7 +95,8 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
unit_size = AV_RB16(extradata); unit_size = AV_RB16(extradata);
total_size += unit_size+4; total_size += unit_size+4;
if (total_size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE || extradata+2+unit_size > avctx->extradata+avctx->extradata_size) { if (total_size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE ||
extradata+2+unit_size > avctx->extradata+avctx->extradata_size) {
av_free(out); av_free(out);
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
...@@ -143,13 +144,13 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, ...@@ -143,13 +144,13 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
/* prepend only to the first type 5 NAL unit of an IDR picture */ /* prepend only to the first type 5 NAL unit of an IDR picture */
if (ctx->first_idr && unit_type == 5) { if (ctx->first_idr && unit_type == 5) {
if (alloc_and_copy(poutbuf, poutbuf_size, if (alloc_and_copy(poutbuf, poutbuf_size,
avctx->extradata, avctx->extradata_size, avctx->extradata, avctx->extradata_size,
buf, nal_size) < 0) buf, nal_size) < 0)
goto fail; goto fail;
ctx->first_idr = 0; ctx->first_idr = 0;
} else { } else {
if (alloc_and_copy(poutbuf, poutbuf_size, if (alloc_and_copy(poutbuf, poutbuf_size,
NULL, 0, NULL, 0,
buf, nal_size) < 0) buf, nal_size) < 0)
goto fail; goto fail;
if (!ctx->first_idr && unit_type == 1) if (!ctx->first_idr && unit_type == 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment