cnt = *(p++); // Number of pps
for (i = 0; i < cnt; i++) {
nalsize = AV_RB16(p) + 2;
- if(decode_nal_units(h, p, nalsize) < 0) {
+ if (decode_nal_units(h, p, nalsize) < 0) {
av_log(avctx, AV_LOG_ERROR, "Decoding pps %d from avcC failed\n", i);
return -1;
}
MPV_common_end(s);
}
if (!s->context_initialized) {
- if(h != h0){
- av_log(h->s.avctx, AV_LOG_ERROR, "we cant (re-)initialize context during parallel decoding\n");
+ if (h != h0) {
+ av_log(h->s.avctx, AV_LOG_ERROR, "Cannot (re-)initialize context during parallel decoding.\n");
return -1;
}
s->avctx->hwaccel = ff_find_hwaccel(s->avctx->codec->id, s->avctx->pix_fmt);
- if (MPV_common_init(s) < 0){
- av_log(h->s.avctx, AV_LOG_ERROR, "MPV_common_init() failed\n");
+ if (MPV_common_init(s) < 0) {
+ av_log(h->s.avctx, AV_LOG_ERROR, "MPV_common_init() failed.\n");
return -1;
}
s->first_field = 0;
ff_h264_alloc_tables(h);
if (!HAVE_THREADS || !(s->avctx->active_thread_type&FF_THREAD_SLICE)) {
- if (context_init(h) < 0){
- av_log(h->s.avctx, AV_LOG_ERROR, "context_init() failed\n");
+ if (context_init(h) < 0) {
+ av_log(h->s.avctx, AV_LOG_ERROR, "context_init() failed.\n");
return -1;
}
} else {
}
for(i = 0; i < s->avctx->thread_count; i++)
- if(context_init(h->thread_context[i]) < 0){
- av_log(h->s.avctx, AV_LOG_ERROR, "context_init() failed\n");
+ if (context_init(h->thread_context[i]) < 0) {
+ av_log(h->s.avctx, AV_LOG_ERROR, "context_init() failed.\n");
return -1;
}
}
av_log(s->avctx, AV_LOG_INFO, "Cannot parallelize deblocking type 1, decoding such frames in sequential order\n");
h0->single_decode_warning = 1;
}
- if(h != h0){
- av_log(h->s.avctx, AV_LOG_ERROR, "deblocking switched inside frame\n");
+ if (h != h0) {
+ av_log(h->s.avctx, AV_LOG_ERROR, "Deblocking switched inside frame.\n");
return 1;
}
}