Mercurial > libavcodec.hg
comparison vc1_parser.c @ 4931:0d1cc37d9430 libavcodec
make some parser parameters const to avoid casting const to non-const
author | aurel |
---|---|
date | Mon, 07 May 2007 00:47:03 +0000 |
parents | 270c8a34f234 |
children | e9d9d946f213 |
comparison
equal
deleted
inserted
replaced
4930:655d25351bfc | 4931:0d1cc37d9430 |
---|---|
70 return END_NOT_FOUND; | 70 return END_NOT_FOUND; |
71 } | 71 } |
72 | 72 |
73 static int vc1_parse(AVCodecParserContext *s, | 73 static int vc1_parse(AVCodecParserContext *s, |
74 AVCodecContext *avctx, | 74 AVCodecContext *avctx, |
75 uint8_t **poutbuf, int *poutbuf_size, | 75 const uint8_t **poutbuf, int *poutbuf_size, |
76 const uint8_t *buf, int buf_size) | 76 const uint8_t *buf, int buf_size) |
77 { | 77 { |
78 ParseContext *pc = s->priv_data; | 78 ParseContext *pc = s->priv_data; |
79 int next; | 79 int next; |
80 | 80 |
81 if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){ | 81 if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){ |
82 next= buf_size; | 82 next= buf_size; |
83 }else{ | 83 }else{ |
84 next= vc1_find_frame_end(pc, buf, buf_size); | 84 next= vc1_find_frame_end(pc, buf, buf_size); |
85 | 85 |
86 if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) { | 86 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { |
87 *poutbuf = NULL; | 87 *poutbuf = NULL; |
88 *poutbuf_size = 0; | 88 *poutbuf_size = 0; |
89 return buf_size; | 89 return buf_size; |
90 } | 90 } |
91 } | 91 } |
92 *poutbuf = (uint8_t *)buf; | 92 *poutbuf = buf; |
93 *poutbuf_size = buf_size; | 93 *poutbuf_size = buf_size; |
94 return next; | 94 return next; |
95 } | 95 } |
96 | 96 |
97 static int vc1_split(AVCodecContext *avctx, | 97 static int vc1_split(AVCodecContext *avctx, |