diff h264.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 777f250df232
children 9a6a0818e93f
line wrap: on
line diff
--- a/h264.c	Sun May 06 15:25:04 2007 +0000
+++ b/h264.c	Mon May 07 00:47:03 2007 +0000
@@ -8039,7 +8039,7 @@
 #ifdef CONFIG_H264_PARSER
 static int h264_parse(AVCodecParserContext *s,
                       AVCodecContext *avctx,
-                      uint8_t **poutbuf, int *poutbuf_size,
+                      const uint8_t **poutbuf, int *poutbuf_size,
                       const uint8_t *buf, int buf_size)
 {
     H264Context *h = s->priv_data;
@@ -8051,7 +8051,7 @@
     }else{
         next= find_frame_end(h, buf, buf_size);
 
-        if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) {
+        if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
             *poutbuf = NULL;
             *poutbuf_size = 0;
             return buf_size;
@@ -8063,7 +8063,7 @@
         }
     }
 
-    *poutbuf = (uint8_t *)buf;
+    *poutbuf = buf;
     *poutbuf_size = buf_size;
     return next;
 }
@@ -8303,7 +8303,7 @@
     if(s->flags&CODEC_FLAG_TRUNCATED){
         int next= find_frame_end(h, buf, buf_size);
 
-        if( ff_combine_frame(&s->parse_context, next, &buf, &buf_size) < 0 )
+        if( ff_combine_frame(&s->parse_context, next, (const uint8_t **)&buf, &buf_size) < 0 )
             return buf_size;
 //printf("next:%d buf_size:%d last_index:%d\n", next, buf_size, s->parse_context.last_index);
     }