diff --git a/AviSynth/video_output.cpp b/AviSynth/video_output.cpp index 2cb273d9..5b434487 100644 --- a/AviSynth/video_output.cpp +++ b/AviSynth/video_output.cpp @@ -865,7 +865,8 @@ void avs_set_frame_properties env->propSetInt(props, "_DurationNum", duration_num, 0); env->propSetInt(props, "_DurationDen", duration_den, 0); if (stream) - env->propSetFloat(props, "_AbsoluteTime", ((stream->start_time != AV_NOPTS_VALUE) ? (static_cast(stream->start_time) / stream->time_base.den * stream->time_base.num) : 0.0) + env->propSetFloat(props, "_AbsoluteTime", ((stream->start_time != AV_NOPTS_VALUE) ? + (static_cast(stream->start_time) / stream->time_base.den * stream->time_base.num) : 0.0) + static_cast(n * duration_num) / duration_den, 0); else env->propSetFloat(props, "_AbsoluteTime", static_cast(n * duration_num) / duration_den, 0); @@ -883,7 +884,8 @@ void avs_set_frame_properties env->propSetInt(props, "_ChromaLocation", av_frame->chroma_location - 1, 0); } /* Picture type */ - char pict_type = av_get_picture_type_char(av_frame->pict_type); + char pict_type = (av_frame->pict_type == 80 || av_frame->pict_type == 73) ? av_frame->pict_type + : av_get_picture_type_char(av_frame->pict_type); env->propSetData(props, "_PictType", &pict_type, 1, 0); /* BFF or TFF */ int field_based = 0; diff --git a/VapourSynth/video_output.c b/VapourSynth/video_output.c index d6036df9..5e8d7890 100644 --- a/VapourSynth/video_output.c +++ b/VapourSynth/video_output.c @@ -1043,7 +1043,8 @@ void vs_set_frame_properties vsapi->propSetInt( props, "_ChromaLocation", av_frame->chroma_location - 1, paReplace ); } /* Picture type */ - char pict_type = av_get_picture_type_char( av_frame->pict_type ); + char pict_type = (av_frame->pict_type == 80 || av_frame->pict_type == 73) ? av_frame->pict_type + : av_get_picture_type_char(av_frame->pict_type); vsapi->propSetData( props, "_PictType", &pict_type, 1, paReplace ); /* BFF or TFF */ int field_based = 0;