* @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;
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;
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;
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
}
}
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;