]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_parser.c
vc1dec: Update destination pointers in context for fields
[ffmpeg] / libavcodec / h264_parser.c
index 8c84d439d8a5a134f785854207e72dd0ea3a5ed4..e5d2c03f8afc5176194b99d4f8efab919340260c 100644 (file)
  * @author Michael Niedermayer <michaelni@gmx.at>
  */
 
+#include "libavutil/attributes.h"
 #include "parser.h"
 #include "h264data.h"
 #include "golomb.h"
+#include "internal.h"
 
 #include <assert.h>
 
 
-static int ff_h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_size)
+static int h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_size)
 {
     int i;
     uint32_t state;
@@ -130,7 +132,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
 
     for(;;) {
         int src_length, dst_length, consumed;
-        buf = avpriv_mpv_find_start_code(buf, buf_end, &state);
+        buf = avpriv_find_start_code(buf, buf_end, &state);
         if(buf >= buf_end)
             break;
         --buf;
@@ -264,7 +266,7 @@ static int h264_parse(AVCodecParserContext *s,
     if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){
         next= buf_size;
     }else{
-        next= ff_h264_find_frame_end(h, buf, buf_size);
+        next = h264_find_frame_end(h, buf, buf_size);
 
         if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
             *poutbuf = NULL;
@@ -274,7 +276,7 @@ static int h264_parse(AVCodecParserContext *s,
 
         if(next<0 && next != END_NOT_FOUND){
             assert(pc->last_index + next >= 0 );
-            ff_h264_find_frame_end(h, &pc->buffer[pc->last_index + next], -next); //update state
+            h264_find_frame_end(h, &pc->buffer[pc->last_index + next], -next); // update state
         }
     }
 
@@ -332,7 +334,7 @@ static void close(AVCodecParserContext *s)
     ff_h264_free_context(h);
 }
 
-static int init(AVCodecParserContext *s)
+static av_cold int init(AVCodecParserContext *s)
 {
     H264Context *h = s->priv_data;
     h->thread_context[0] = h;