aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-23 14:44:07 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-23 14:44:07 +0000
commitf3ba9db42d836403372de34b0ed1c51f71ad5fad (patch)
treea61772ec5538ea16cd45840ac22c572540a7561a /libavcodec/h264.c
parent617e42e2c49878f8694a5c870f3451d21354d5ab (diff)
downloadffmpeg-f3ba9db42d836403372de34b0ed1c51f71ad5fad.tar.gz
Remove truncated support, use an AVParser if you used that, it is the same.
Originally committed as revision 14350 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 78cc3298fa..5aab7a84bd 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -7712,17 +7712,10 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
* returns the number of bytes consumed for building the current frame
*/
static int get_consumed_bytes(MpegEncContext *s, int pos, int buf_size){
- if(s->flags&CODEC_FLAG_TRUNCATED){
- pos -= s->parse_context.last_index;
- if(pos<0) pos=0; // FIXME remove (unneeded?)
-
- return pos;
- }else{
if(pos==0) pos=1; //avoid infinite loops (i doubt that is needed but ...)
if(pos+10>buf_size) pos=buf_size; // oops ;)
return pos;
- }
}
static int decode_frame(AVCodecContext *avctx,
@@ -7737,15 +7730,6 @@ static int decode_frame(AVCodecContext *avctx,
s->flags= avctx->flags;
s->flags2= avctx->flags2;
- if(s->flags&CODEC_FLAG_TRUNCATED){
- const int next= ff_h264_find_frame_end(h, buf, buf_size);
- assert((buf_size > 0) || (next == END_NOT_FOUND));
-
- if( ff_combine_frame(&s->parse_context, next, &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);
- }
-
/* no supplementary picture */
if (buf_size == 0) {
Picture *out;
@@ -8166,7 +8150,7 @@ AVCodec h264_decoder = {
NULL,
decode_end,
decode_frame,
- /*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
+ /*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_DELAY,
.flush= flush_dpb,
.long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
};