avcodec: Return EPROTO when encountering missing fragments in H264 stream, to trigger intra-frame request
@@ -333,6 +333,7 @@ int decode_h264(struct viddec_state *st, struct vidframe *frame,
" ignoring NAL\n");
fragment_rewind(st);
++st->stats.n_lost;
+ return EPROTO;
}
st->frag_start = st->mb->pos;
@@ -351,7 +352,7 @@ int decode_h264(struct viddec_state *st, struct vidframe *frame,
if (!st->frag) {
debug("avcodec: ignoring fragment\n");
++st->stats.n_lost;
- return 0;
+ return EPROTO;
}
if (seq_diff(st->frag_seq, seq) != 1) {
@@ -359,7 +360,7 @@ int decode_h264(struct viddec_state *st, struct vidframe *frame,
fragment_rewind(st);
st->frag = false;
++st->stats.n_lost;
- return 0;
+ return EPROTO;
}
}
