mpegvideo: don't pretend the first frame is always a key frame

Signed-off-by: Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>

Modify the parser initialization so that parsers can
set pict_type themselves.  Use this in the mpegvideo parser
so that initial frames are not unconditionally I frames.
I have had this in my tree for several years.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Wolfram Gloger
2012-03-16 21:17:00 +01:00
committed by Michael Niedermayer
parent 6f9803e5e0
commit f8353d5fda
3 changed files with 12 additions and 5 deletions

View File

@@ -63,6 +63,8 @@ AVCodecParserContext *av_parser_init(int codec_id)
av_free(s);
return NULL;
}
s->fetch_timestamp=1;
s->pict_type = AV_PICTURE_TYPE_I;
if (parser->parser_init) {
ret = parser->parser_init(s);
if (ret != 0) {
@@ -71,8 +73,6 @@ AVCodecParserContext *av_parser_init(int codec_id)
return NULL;
}
}
s->fetch_timestamp=1;
s->pict_type = AV_PICTURE_TYPE_I;
s->key_frame = -1;
s->convergence_duration = 0;
s->dts_sync_point = INT_MIN;