Mercurial > libavcodec.hg
comparison mpegvideo.c @ 2251:ab849bab3472 libavcodec
100l
author | michael |
---|---|
date | Fri, 24 Sep 2004 17:30:04 +0000 |
parents | b8bad8bbbc64 |
children | 7e0b2e86afa9 |
comparison
equal
deleted
inserted
replaced
2250:902caf560c43 | 2251:ab849bab3472 |
---|---|
1972 if(time <= last){ | 1972 if(time <= last){ |
1973 av_log(s->avctx, AV_LOG_ERROR, "Error, Invalid timestamp=%Ld, last=%Ld\n", pic->pts, s->user_specified_pts); | 1973 av_log(s->avctx, AV_LOG_ERROR, "Error, Invalid timestamp=%Ld, last=%Ld\n", pic->pts, s->user_specified_pts); |
1974 return -1; | 1974 return -1; |
1975 } | 1975 } |
1976 } | 1976 } |
1977 s->user_specified_pts= pic->pts; | |
1977 }else{ | 1978 }else{ |
1978 if(s->user_specified_pts != AV_NOPTS_VALUE){ | 1979 if(s->user_specified_pts != AV_NOPTS_VALUE){ |
1980 s->user_specified_pts= | |
1979 pic->pts= s->user_specified_pts + AV_TIME_BASE*(int64_t)s->avctx->frame_rate_base / s->avctx->frame_rate; | 1981 pic->pts= s->user_specified_pts + AV_TIME_BASE*(int64_t)s->avctx->frame_rate_base / s->avctx->frame_rate; |
1980 av_log(s->avctx, AV_LOG_INFO, "Warning: AVFrame.pts=? trying to guess (%Ld)\n", pic->pts); | 1982 av_log(s->avctx, AV_LOG_INFO, "Warning: AVFrame.pts=? trying to guess (%Ld)\n", pic->pts); |
1981 }else{ | 1983 }else{ |
1982 pic->pts= av_rescale(pic->display_picture_number*(int64_t)s->avctx->frame_rate_base, AV_TIME_BASE, s->avctx->frame_rate); | 1984 pic->pts= av_rescale(pic->display_picture_number*(int64_t)s->avctx->frame_rate_base, AV_TIME_BASE, s->avctx->frame_rate); |
1983 } | 1985 } |
1984 } | 1986 } |
1985 s->user_specified_pts= pic->pts; | |
1986 } | 1987 } |
1987 | 1988 |
1988 /* shift buffer entries */ | 1989 /* shift buffer entries */ |
1989 for(i=1; i<MAX_PICTURE_COUNT /*s->encoding_delay+1*/; i++) | 1990 for(i=1; i<MAX_PICTURE_COUNT /*s->encoding_delay+1*/; i++) |
1990 s->input_picture[i-1]= s->input_picture[i]; | 1991 s->input_picture[i-1]= s->input_picture[i]; |