[FFmpeg-devel] [PATCH]Fix for issue694. Dirac A/V sync loss
Diego Biurrun
diego
Fri Dec 19 10:55:58 CET 2008
On Fri, Dec 05, 2008 at 02:18:47PM +1100, Anuradha Suraparaju wrote:
>
> I've attached a modified patch to this email.
I was about to apply this, but noticed a bunch of cosmetic issues that
I was too lazy to fix myself:
> --- libavcodec/dirac_parser.c (revision 16006)
> +++ libavcodec/dirac_parser.c (working copy)
> @@ -34,42 +35,200 @@
> +static int unpack_parse_unit(DiracParseUnit *pu, DiracParseContext *pc,
> + int offset)
one space too much
> +static int dirac_combine_frame(AVCodecParserContext *s, AVCodecContext *avctx,
> + int next, const uint8_t **buf, int *buf_size)
ditto
> + int parse_timing_info =
> + (s->pts == AV_NOPTS_VALUE &&s->dts == AV_NOPTS_VALUE);
This would look nicer if you split the line at the &&.
> + memcpy(pc->buffer, pc->buffer + pc->overread_index,
> + pc->index - pc->overread_index);
one space too much
> + void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size,
> + pc->index + (*buf_size - pc->sync_offset));
weird indentation
> + pc->buffer = new_buffer;
> + memcpy(pc->buffer+pc->index, (*buf + pc->sync_offset),
> + *buf_size - pc->sync_offset);
ditto
> + DiracParseUnit pu1, pu;
> + void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size,
> + pc->index + next);
another extra space
Diego
More information about the ffmpeg-devel
mailing list